Sign in to follow this  
broady

2D space battle game

Recommended Posts

broady    119
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 [url="http://www.amazon.it/XNA-Game-Studio-4-0-Programming/dp/0672333457/ref=cm_cr_wr_img"]book[/url].
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

Share this post


Link to post
Share on other sites
beatlefan    198
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.

Share this post


Link to post
Share on other sites
falcon93    121
Yeah, just use a Texture2D [img]http://public.gamedev.net/public/style_emoticons/default/smile.gif[/img]

Loading the texture
[code]
Texture2D texture;
texture = Game.Content.Load<Texture2D>("path");
[/code]


Drawing the texture
[code]
// 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();
[/code]

Share this post


Link to post
Share on other sites
mmakrzem    1036
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this