Archived

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

Deek_2k

openGL.. any tuts?

Recommended Posts

Deek_2k    122
are there any books or tut''s that are geared towards using OpenGL to do isometric/tile-based game engines? and another question... do you think it will be less painful in the long run to learn OOP (object oriented programming) and do my engine in that, rather than function based programming? another thing.. will the program somewhat be optimized in run times if i did it in OOP? -deek

Share this post


Link to post
Share on other sites
Jappie    122
I don''t really know about the OGL tuts, but I''d recommend learning OOP for sure. Once you''ve got it down, your code will be tidier, more readable, it''s easier to expand / change stuff, and you can build an OOP app based on an UML / NIAM analysis, for example.

-----------------------------
Jappie
BabJap Productions
http://come.to/babjap

"There''s no such things as bugs; they''re just unintentional extra features"

Share this post


Link to post
Share on other sites
Mayrel    348
OOP won''t make your engine faster, but is will make it easier for others, and you, to make changes to your engine later on.

Since the very nature of most tile-based games is class/object based, OOP is the perfect development tool.

As an example, three almost universal types of unit are Ground, Air and Sea. All Ground units have something in common - they can only move on the ground, similarly Air and Sea units operate in their respective environments. Units of each type also move in similar ways. Ground units move more slowly up hills, and faster down them, for example. Air units move vertically, and don''t care about hills. Sea units don''t go anywhere near hills, but they do leave a wake. You can code the different behaviours and effects of the types of units on GroundUnit, AirUnit, and SeaUnit classes, for example. If you later decide to create a submarine (assuming it fits in with your theme), then you can create a SubmarineUnit class that inherits almost all of the behaviour of the SeaUnit class, except that it turns off the wake when the submarine is below surface.

If you want to attach scripts to your game (I, personally, would script all the units in my game, leaving only the core physics and rendering tasks to the engine), then your scripts are likely to be OOP in nature, in that you will probably associate a script with each unit - this makes it easy to mix-and-match cutomized units. If your engine is OOP, it''ll be easier to connect your scripts to your engine.

Martin Estevao, who also wrote a tiling tut for DirectX, wrote one for OpenGL. It is at http://www.gamedev.net/reference/articles/article1256.asp. It''s not a full engine, but it does show you how to tile stuff. For more general OpenGL stuff, there''s a section for it in the Articles & Resources here at gamedev.


Uuuuuulrika-ka-ka-ka-ka-ka

Share this post


Link to post
Share on other sites