Páginas

Mostrando las entradas con la etiqueta XNA. Mostrar todas las entradas
Mostrando las entradas con la etiqueta XNA. Mostrar todas las entradas

Global Game Jam: Resources for Jammers and game developers



Next weekend will be the Global Game Jam (GGJ) 2014. The Global Game Jam (GGJ) is the world's largest game jam event taking place around the world at physical locations. Think of it as a hackathon focused on game development. It is the growth of an idea that in today’s heavily connected world, we could come together, be creative, share experiences and express ourselves in a multitude of ways using video games – it is very universal. The weekend stirs a global creative buzz in games, while at the same time exploring the process of development, be it programming, iterative design, narrative exploration or artistic expression. It is all condensed into a 48 hour development cycle. The GGJ encourages people with all kinds of backgrounds to participate and contribute to this global spread of game development and creativity. (extracted from GGJ's website)

Here you have a list of resources for Jammers and also game developers / designers. This list was created by our friend of Rosario Game Dev. It's not a complete list but a good starting point. Feel free to added more resources in the comments. Enjoy it!


Table of contents

  1. Tools
  2. Vector/Scalar Image & 2D Graphics
  3. Source Control
  4. IDEs
  5. Engines
  6. Sound
  7. HTML5 / Javascript
  8. Frameworks
  9. Assets
  10. SDKs
  11. Miscellaneous
  12. Board games

Tools

Vector/Scalar Image & 2D Graphics

Source Control

IDEs

Engines

Sound

HTML5 / Javascript

Frameworks

Assets

SDKs

Miscellaneous

Board games

Task Management Tools

BEPUphysics (physics library) for Monogame

Last night, I was looking for a 3D physics engine for Monogame and I reached BEPUphysics.

BEPUphysics is a 3D physics library by BEPU.  It’s fast and has a bunch of cool features like constraints, terrain, static and instanced meshes, continuous collision detection, custom collision rules, vehicles, easy multithreading, yadda yadda yadda.  Full support for XBox360 and WP7 too!

Investigating BEPU website, I found that there's a work in progress version of BEPUPhysics for Monogame (the clue was a one blog post called "BEPUPhisics and XNA" and said The most likely target frameworks for the rewritten demos will be either SharpDX or, for wider use, MonoGame.) and also a twitt form the BEPUPhysics that said "The new demos application is indeed almost certainly going to be MonoGame based"

So I decided to take a look at BEPU source code repository and community-contributed forks.

I saw a monogame fork of BEPUphysics at http://bepuphysics.codeplex.com/SourceControl/network/forks/StephenOC/MonoGame and quickly download it, but my surprise was when I found that It's a windows version of BEPUphysics. But I far as I know I read it's posible running BEPUphysics on Monogame so I decided to try.

First, I openned Visual Studio and create a Windows class library. Then, I references Monogame Dll (to this test I use Windows OpenGL version) and put all BEPUphysics classes. Dont forget to set your project build propertis symbols to WINDOWS;ALLOWUNSAFE;CHECKMATH;MONOGAME


After a few build trys and removing some unuseful files, my build was succesful!

Then I create a Monogame Windows OpenGL game to test the BlocksExplodeYourCastle BEPU Demo game and I (almost) everything works out of the box! I say almost because the Monogame version of BlocksExplodeYourCastle was a lot of slower then XNA Version, but that's another history.


Also, I found a monogame build on the Monogame brach of PloobsEngine (https://code.google.com/p/port-ploobsengine/source/browse/PloobsEngine/PloobsEngine/Dlls/BEPUphysics.dll?name=MonoReach), but the BlocksExplodeYourCastle monogame version is still slow.

PS: I just run BlocksExplodeYourCastle monogame version and It runs at an acceptable speed! so I just need to make some more tests

iAd patch for ExEn

ExEn is a high-performance implementation of a subset of the XNA API that runs on Silverlight, iOS and Android. (http://exen.codeplex.com/)

From ExEn codeplex site "ON THE FUTURE OF EXEN: I no longer have time to properly maintain and support ExEn (see this blog post for details). On the one hand: ExEn is still an excellent choice for iOS and Android development, due to its stability and performance. On the other hand: I'm not adding new features or fixing bugs (which occasionally crop up when Apple changes something)."

My game for iOs, A comic of zombies (http://itunes.apple.com/us/app/a-comic-of-zombies/id530916013?mt=8), use ExEn. You can visit its website http://acoz.mylittlebets.com/ if you want to download Pc Version or get the lastest news.

Well, the thing is that today I upload a patch for iAd suppot. This and other patchs can be downloaded from http://exen.codeplex.com/SourceControl/list/patches

Enjoy it!

XNA Bezier Curve

A Bézier curve is a type of curve that is easy to use, and can describe many shapes. Bézier curves are famously used for representing characters in fonts, and shapes in vehicle design. Bézier curves are also used in vector art packages for curve drawing, and in 3D animation tools to represent animation paths.

In games, Bézier curves are sometimes useful to describe paths: the racing line in a racing game, or the line in line-drawing games such as Flight Control, or the looping butterfly that enlivens an RPG.

Bézier curves are popular because their mathematical descriptions are compact, intuitive, and elegant. They are easy to compute, easy to use in higher dimensions (3D and up), and can be stitched together to represent any shape you can imagine.


Thanks to http://blog.icode.com/ I can implement a XNA Bezier Curve, here's what it look like.



BezierCurve.cs

using Microsoft.Xna.Framework;

    public class BezierCurve
    {
        public static Vector2 GetPoint(float t, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3)
        {
            float cx = 3 * (p1.X - p0.X);
            float cy = 3 * (p1.Y - p0.Y);

            float bx = 3 * (p2.X - p1.X) - cx;
            float by = 3 * (p2.Y - p1.Y) - cy;

            float ax = p3.X - p0.X - cx - bx;
            float ay = p3.Y - p0.Y - cy - by;

            float Cube = t * t * t;
            float Square = t * t;

            float resX = (ax * Cube) + (bx * Square) + (cx * t) + p0.X;
            float resY = (ay * Cube) + (by * Square) + (cy * t) + p0.Y;

            return new Vector2(resX, resY);
        }
    }

Game.cs (main game loop class)
public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;
        Vector2 PlotPoint, p0, p1,p2, p3;

        private Texture2D dummyTexture;

        private float t;

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
        }

        ///
        /// Permite que el juego realice la inicialización que necesite para empezar a ejecutarse.
        /// Aquí es donde puede solicitar cualquier servicio que se requiera y cargar todo tipo de contenido
        /// no relacionado con los gráficos. Si se llama a base.Initialize, todos los componentes se enumerarán
        /// e inicializarán.
        ///
        protected override void Initialize()
        {
            // TODO: agregue aquí su lógica de inicialización
            p0 = new Vector2(75, 250);
            p1 = new Vector2(100, 150); 
            p2 = new Vector2(500, 100);
            p3 = new Vector2(550, 200);

            base.Initialize();
        }

        ///
        /// LoadContent se llama una vez por juego y permite cargar
        /// todo el contenido.
        ///
        protected override void LoadContent()
        {
            // Crea un SpriteBatch nuevo para dibujar texturas.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content para cargar aquí el contenido del juego
            this.dummyTexture = new Texture2D(GraphicsDevice, 1, 1);
            this.dummyTexture.SetData(new[] { Color.White });
        }

        ///
        /// UnloadContent se llama una vez por juego y permite descargar
        /// todo el contenido.
        ///
        protected override void UnloadContent()
        {
            // TODO: descargue aquí todo el contenido que no pertenezca a ContentManager
        }

        ///
        /// Permite al juego ejecutar lógica para, por ejemplo, actualizar el mundo,
        /// buscar colisiones, recopilar entradas y reproducir audio.
        ///
        /// Proporciona una instantánea de los valores de tiempo.
        protected override void Update(GameTime gameTime)
        {
            // Permite salir del juego
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();
            
            var keyboardState = Keyboard.GetState();

            if (keyboardState.IsKeyDown(Keys.R))
            {
                t = 0.0f;
            }
            
            t += (float)gameTime.ElapsedGameTime.Milliseconds / 1000;

            if (t > 1.0f)
            {
                return;
            }

            // TODO: agregue aquí su lógica de actualización
            //for (float t = 0; t <= 1.0f; t += 0.01f)
            //{
                PlotPoint = BezierCurve.GetPoint(t, p0, p1, p2, p3);

                // now call some function to plot the PlotPoint
            //    YourDrawFunction(PlotPoint);
            //}

            base.Update(gameTime);
        }

        ///
        /// Se llama cuando el juego debe realizar dibujos por sí mismo.
        ///
        /// Proporciona una instantánea de los valores de tiempo.
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: agregue aquí el código de dibujo
            spriteBatch.Begin();

            this.spriteBatch.Draw(
                    this.dummyTexture,
                    PlotPoint,
                    new Rectangle(0, 0, 20, 20),
                    Color.Red);

            this.spriteBatch.Draw(
                    this.dummyTexture,
                    p0,
                    new Rectangle(0, 0, 20, 20),
                    Color.Green);

            this.spriteBatch.Draw(
                    this.dummyTexture,
                    p1,
                    new Rectangle(0, 0, 20, 20),
                    Color.Blue);

            this.spriteBatch.Draw(
                    this.dummyTexture,
                    p2,
                    new Rectangle(0, 0, 20, 20),
                    Color.Yellow);

            this.spriteBatch.Draw(
                    this.dummyTexture,
                    p3,
                    new Rectangle(0, 0, 20, 20),
                    Color.Black);

            spriteBatch.End();

            base.Draw(gameTime);
        }
    }



If you want the project source code, just tweet me https://twitter.com/vackup

A comic of zombies new website launched!

We are very happy to announce that, in addition to our facebook community, we have a new web site for A comic of zombies!

You can visit it from http://acoz.mylittlebets.com and stay in touch with us!



Download original Platformer Starter Kit Source Code for XNA 4

As Microsoft discontinue the XNA development for Windows 8, he removes all links to download XNA 4 starter kits.

I upload original Platformer source code to bitbucket. Here you can download original Platformer Starter Kit Source Code for XNA 4

https://bitbucket.org/hzaldivar/plaformerxna4/

XNA Projectile Motion

Actualmente me encuentro programando un juego en XNA y tenia que hacer que un personaje lance por el otro a otro personaje.
Buscando en internet me di cuenta que lo que necesitaba hacer era lanzar un proyectil o "Projectile Motion".
La verdad me senti medio decepcionado porque no encontre un ejemplo sencillo sobre esto asi que gracias a un par de formulas y ejemplos, pude hacer lo que queria y lo comparto con ustedes... devuelvo a la comunidad un poquito de lo que ella me dio. Espero que les sirva!!!

Aca les dejo un video en el cual me base:



Las fuentes que consulte y me sirvieron fueron:


Download (XNA 4.0 - VS2010):