Archived

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

Better to start 2D or 3D after C++?

This topic is 5652 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

My basic background behind my question: I am able to generate text based console programs using C++ and am interested in moving on to something a bit more exciting. I picked up a copy of OpenGL Game Programming and seem to be understanding it ok up to about chapter 6 so far. I have some ideas for games I''d like to work on but it seems like working on any of those is going to be a long time in coming... I am currently a computer network engineer who is doing this in his spare time. Would I be better off picking up a DirectX book like Tricks of the Windows Game Programming Gurus and learn DirectDraw. I think my current game ideas would be met sufficiently by 2D. Also I hear tetris and breakout are good starter games and 3d doesn''t seem to be in the right direction. Thanks for any advice you can give me.

Share this post


Link to post
Share on other sites
Yeah, start off with 2D. Your best bet is to keep things very simple and make a small little game and then build up from there. You know the saying, "You can''t learn to walk before you learn to crawl." With 2D, you''ll learn all the basics about actually making a game without having to worry about all the crazy 3D headaches. Good luck!

Share this post


Link to post
Share on other sites
Yeah, make something simple in 2D, BUT learn from what you are doing and don''t assume that because something works that it is the best way of doing it.
Making a simple game can teach you a lot about design, game structure, and the like but it is also important that you investigate the techniques you employ. Read around, try out different things.
In fact, once you have a simple game up and working, it is the perfect environment for trying out new things before you implement them in larger projects.

Share this post


Link to post
Share on other sites
If 2D suits you, definitely use that, no question. 2D is hands down easier than 3D. but my sense is that a lot of that "easyness" comes from the math domain. 2d math is much easier than 3D math.

my personal belief on the whole 2D/3D choice is that whichever you are more interested in is the place to start, witht the BIG assumption that you have good linear algebra / Euclidian Geometry skills.

if you''re good at vector math and get 3D geometry and transforms, then 3D programming isn''t really all that much more difficult than 2D. and if you really like math then, IMHO, 3D is a lot more interesting. For me, 3D was the place to start b/c that''s what i was interested in doing from a math/physics/graphics perspective. and it is working out fine.

-me

Share this post


Link to post
Share on other sites
Hmm, good input so far, I thank you for that. It is looking like I may head want to change directions and head for 2D if I plan to get to creating an actual game anytime soon. The 3D math hasn''t bothered me too much at this point. I took honors math classes in high school but that was a few years back now... really I guess it''s just hard to hold my attention right now reading about the extensive lighting effects and whatnot 3D has. 3D just seems to take a lot of steps to make it look good.

I only have limited time to do this, mainly after work and on weekends (when my wife lets me take the time to do it). Which book is best for DirectDraw /2d graphics? If I keep buying too many books my wife will kill me! heh. Seriously though, should I order Tricks of the Windows Game Programming Gurus? Game Progamming All-in-One? Stick with the OpenGL Game Programming book I have? Anyone have opinions on these?
Thanks.


Share this post


Link to post
Share on other sites
I know nothing of OpenGL, but i''m currently using Direct3D to make a simple 2D game with the sprite interface. Does OpenGL have anything similar?
If it does my suggestion would be to use OpenGL in whatever 2D mode it provides. It will be simpler than 3D, you will learn basic game concepts, and hopefully you will still be learning useful stuff about OpenGL for the future

Share this post


Link to post
Share on other sites
If you want to go with OpenGL, then I really don''t see the need to learn DirectDraw first. OpenGL 2D and DirectDraw 2D are substancially different.

Also, if you already have good programming knowledge, and math doesn''t bother you, why not directly start with 3D ? Unless 3D isn''t interesting for you, you could start a simple 2D project under OpenGL and move to 3D later on. The transition will be easy, the API stays the same. That''s not the case with DirectDraw: if you want to move to 3D, you''ll have to learn a substancially different API (D3D or OpenGL).

/ Yann

Share this post


Link to post
Share on other sites
2D isn''t necessarily "harder" than 3D in terms of mathematics... but game engines which manage 3D objects are usually more involved (with regard to scene management, model animation, special effects, etc).

If your "starter" game is 3D, you might become more daunted at the larger task of a 3D engine and its necessary, than a smaller easier-to-manage 2D sprite engine, simply because by design 3D engines have more components than 2D engines.

Example: there are more steps in determining 3D model collision than 2D sprite collision. For 3D, you could use box, sphere, polygon, or per-model-part collision (which could be box, sphere, or polygonal in themselves). Each of these incorporates detailed functional calculations (unless you use another API''s collision routines). Compared to 2D sprites where you have bounding box, per-pixel, or proxy-box collision, these generally require less code, less research, and less experience with mathematics. Failing to implement the former system might easily result in junking your engine and deeming it "too hard".



MatrixCubed
http://MatrixCubed.cjb.net

Share this post


Link to post
Share on other sites
I''m going to buck the trend here and recommend something totally radical. Forget 3D all together. Keep the OpenGL for game programming because its an excellent book especially the Game Engine chapter. What you want are fast results with a minumum of fuss. Go get Allegro. Its straight forward and lets you get graphics on the screen in no time. Then after you wow your wife with a "simple" game like tetris, maybe she''ll let you have more play time so you can delve a bit deeper!

Share this post


Link to post
Share on other sites
KTurner, I''m just getting started myself, but wanted to put my $.02 in:

Don''t get Game Programming All In One. I used it and found it to be a great book, but I needed to relearn a good deal of C++ and knew exactly nothing about game programming. It was great for me as a complete newbie, but it sounds like you already have a good handle on those basic concepts. Much better to spend your $50 or $60 on something of more value to you.

Unfortunately, I don''t know any good 2D graphics books to reccomend (I could use one myself about now). Hopefully, someone else in the forum will have some good suggestions.

Share this post


Link to post
Share on other sites
Well, I played with OpenGL a bit more and also went through some of NeHe''s tutorials. I found them quite useful in reinforcing what I am learning in the OpenGL Game Programming book. I''m going to attempt to continue on with the book and tutorials and see how things progress. If I find things getting a bit too frustrating for my tastes I will play around with OpenGL in Orthographic mode and use 2D. I have to try and stick to my goal. To be able to create games for multiple platforms and using OpenGL is going to be the best way to do that. It was good to hear that the complexities of 3D vs 2D mainly involve the math aspect because I don''t I think have much of a problem there. It''s just so many functions and features I guess it can get overwhelming. One step at a time and I should be ok.

Thanks for all the input everyone.

Share this post


Link to post
Share on other sites