Jump to content
  • Advertisement


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


openGL.. any tuts?

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

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
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.

BabJap Productions

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

Share this post

Link to post
Share on other sites
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.


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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!