Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Webbster

OpenGL OpenGL Project Planning

This topic is 5487 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m going to be designing / modelling my first OpenGL game in a few days and just wanted a little input from some more advanced users of OpenGL. First of all it''s going to be a fairly ''basic'' 2D Side Scroller similiar to Mario. I''ve made countless Mario clones in Flash MX but Flash doesn''t really give me the flexibitly that I have found in C++ and OpenGL programs for obvious reasons. What I want to do is create the game in OpenGL, and have a file format for my game that stores my textures (tiles) for the game. What options are avilable to me in terms of 2D graphics, am I correct in thinking the only real option is sprites. I''m not going to bother with sound or music just yet. As well as having the game I will be creating a seperate Win32 program, very much a Bi-Product of the actual game engine itself which I can use to import my tile files and create the levels visually in real-time. I''ve been doing some experimentation for awhile now and I''m fairly convinced I can give it a go, but I just wanted to know what my options are in terms of the 2D Graphics. If anyone wants to know the target features for the game, I am lucking to have: Jump / Gravity Physics Map Editor Animated Sprites (Again advice on graphics would be great) Tile Librarys Sounds & Music (eventually, given time) Possible storyline (not really essential for the engine) V. Basic Monster AI (i.e. I see you, I shoot you!) Thanks for listening, Ad

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Webbster
What I want to do is create the game in OpenGL, and have a file format for my game that stores my textures (tiles) for the game. What options are avilable to me in terms of 2D graphics, am I correct in thinking the only real option is sprites.



OpenGL doesn''t differentiate between 2D and 3D. The only difference is with 3D you would usually specify a perspective projection (with gluPerspective() or glFrustum()), and with 2D you''d specify an orthogonal projection (with glOrtho) - which is the default projection anyway BTW.

To render in 2D, you''d do exactly the same as to render in 3D, you just don''t use the Z axis. If you want a simple tile-based engine, you can render the scene as a grid of quads. You could also render 2-dimensional polygonal shapes if you want to.

OpenGL does have support for point sprites, but these are limited in size and are probably not particularly useful for what you want. If I were you, I''d stick with textured quads.

Share this post


Link to post
Share on other sites
Learn how to load/map texture onto quads (simple) and you can apply everything you know from your previous experience in 2D.
The difference is that OpenGL will clip sprite-rectangle for you...

Share this post


Link to post
Share on other sites
Thanks for that, I didn''t realise the 2D technique involved, because all the texts i''ve learnt OpenGL from only teach 3D practices.

Thanks Again!
Ad

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!