Archived

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

New to graphics programming

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

Hi All! I am New to SDL programming (and graphics programming in general) but not new to C++. I have been playing around with SDL for a week or so now and have been following the tutorials over at cone3d. I am now ready to begin a game of my own, probably a Phoenix type game. Now my question is related to OOP. All the tutorials I have gone through thus far have have had more of a C coding style to them (maybe because they were fairly simple) and I would like some clarifacation on my OOP approach to this (As I was taught OOP from the beggining. Needless to say I am a big OOP fan). What I would like to do is to make a display class which contains all the necessary SDL iniatilizations and functions. I would then pump all the info to this class as the graphics need to be updated. Is this a reasonable OOP approach to this? Any suggestions or feed back is greatly appreciated! I have a strong backround in C++ and decided it was time to take it a step further and learn some graphics and game programming. Thanks again! Chris

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:

Is this a reasonable OOP approach to this? Any suggestions or feed back is greatly appreciated!



Not really a response to your question, but I just have to say:

Is OOP really necessary for what you''re doing? The fact that you had to turn to a message board just to ask "How can I use OOP for this?" should tell you that this is a situation where OOP is more trouble than it''s worth.

Objects make no sense in your situation. You say you''re new to programming so you''ll probably be messing around with 2D graphics and maybe some 3D stuff. You will mostly be concerned with actions (putting things on the screen), not managing very complex data types.

Once again, OOP is not a panacea. You''re probably realizing that OOP may not be the right approach to this problem, so why force it? You''re looking for a solution in search of a problem.

A lot of graphics programming these days is still done in plain C. There has been much hoopla over the fact that Doom 3 will be using C++, but supposedly the graphics engine will be in plain C. And I''m not sure if it''s true or not but I''ve heard that the designers of Windows NT regret using C++ for graphics over C.

It''s NOT A BAD THING to avoid OOP in some situations. Why must everything be OOP? It''s stOOPid. Use OO techniques where they are appropriate.

Share this post


Link to post
Share on other sites