Archived

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

Fenix_ufo

Some directions needed on graphics...

Recommended Posts

I am somewhat fluent on C++ thanks to a project I made for school which consisted on programming a more or less complex math aplication. So, my current knowledge with C++ is limited to variables, functions, matrixes, etc... Mostly "non fun" aspects of it (altough I enjoy them). I, however, have absolutely no idea on working with graphics, neither 2d or 3d. Basically, I could make you a program that generates random equations and solves them, but I could not make a program that draws a square or changes the color of a pixel. I would like to start learning some, focusing on 2d, but I don't know where to start. Could you give me some direction, point me to some kind of tutorial on direct draw or something like that, give me some advise on what should I learn, I would be very grateful. Also, is there any book you would advise? To learn what I know I used C++, How to Program, Second Edition by Deitel & Deitel, which I found very useful. I don't have it anymore as it was a teacher's. Fenix_ufo [edited by - Fenix_ufo on July 15, 2002 12:33:57 PM]

Share this post


Link to post
Share on other sites
Fortunately, all the un-fun things you learned so far will come in handy for doing more interesting projects.

Normally, I would recommend trying some ASCII graphics in the console for a simple game or two, but I guess you are already familiar enough with text-mode C++. ( Do you know how to use classes, inheritance, polymorphism, function pointers, virtual functions, etc. ?)

If you are thoroughly familiar with C++ it should be very easy to start doing graphics with the Win32 GDI (Provided that you are using Windows). I''m not sure what books/tutorials are available on the GDI, someone help me out here?

If you are not using Windows, I recommend the Simple Directmedia Layer (SDL) at http://www.libsdl.org/ . Even if you are using Windows, it might be worth a shot, because as the name implies, it''s very simple.

Also, you could dive into DirectX (Windows only), since IMHO DirectDraw is the most powerful 2D library available. However, be warned that DirectX is rather unnecessarily complicated and can be very confusing. For a nice book on 2D graphics with DirectDraw, check out Tricks of the Windows Game Programming Gurus by Andre LaMothe.

Finally, there are the 2 major 3D libraries available: OpenGL and Direct3D. I wouldn''t recommend using these yet, since they are complicated even if all you want is some 2D sprites.

Hope this helps.



Things are not what they are.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
learn sdl instead of directdraw and directinput. and when you do 3d, learn opengl instead of direct3d. It is easier and better.

Go to www.libsdl.org and go to the tutorial section. For more opengl tutorials go to nehe.gamedev.net

Share this post


Link to post
Share on other sites
contrary to what some people might say, there is no best route because everyone if different.

Personally, I prefer DirectX because as you become familiar with it you''ll learn how to do not only graphics, but sound, input, and networking all rolled into the same API.

If you''re looking for a great book to get some stuff on the screen and DirectX, which is exclusively for Windows machines and the Xbox, is interesting to ya, I''d recommend the Zen of Direct3D graphics, just like Dean Johnson did. Its a great book, the author really breaks things down and explains them.

If you want to go the OpenGL route, which provides much greater flexibility in programming for different platforms, OpenGL Game Programming is apparently a great book by what I''ve heard.

If you''ve already got a strong grasp on C++ then either of those books will get ya going with getting some cool stuff on the screen.

Share this post


Link to post
Share on other sites