2D space battle game

Started by
3 comments, last by mmakrzem 12 years, 9 months ago
Hello GD,
i wanna code a simple 2d game. My doubts are not technical, i khnow c++, 3d math openGL so im not new to the world. My question is more about how generally 2D games are done in relation to external design tools (i.e. Maya, 3Dmax)

I have started studying XNA on this book.
Now in chapter 5 the author started to speak about imported Models (say a box) and models are new to me. I am speaking of the Model class, its meshes, meshes parts and so forth. In chapter 6 the author speaks about the BaseEffect class (i.e. to manage lights) always referred to a 3D model.

Question: Do i need this concepts for my 2d space battle game? I mean: does a 2D model (model intended as created in a 3rd party software and imported in XNA like the BOX) make sense? Should i just pickup TEXTURE2D stuff?

Hope have been clear.

Thanks
Advertisement
Yeah you shouldn't need all that stuff for a 2d game, just go with Texture2D. I've never used a "2d model" before, so I don't know if there better... but it seems like it could be more work.
Yeah, just use a Texture2D smile.gif

Loading the texture

Texture2D texture;
texture = Game.Content.Load<Texture2D>("path");



Drawing the texture

// spriteBatch is default in a XNA project, change the name if you have renamed it
spriteBatch.Begin();
spriteBatch.Draw(texture, rectangle, Color.White);
spriteBatch.End();
Ok thanks.
if you are only working with 2d textures then you'll be fine, however if you wanted to wow your audience you could use 3d models inside your 2d game. similar to how graphics are done in the tv show futurama. you can then rotate your one model in the scene and not have to worry about generating a bunch of 2d sprites.

This topic is closed to new replies.

Advertisement