Post news RSS Rendering Engine Rewrite Complete

I just finished rewriting the rendering engine underlying Break Blocks, adding a Scene Graph. I have written a tutorial about Scene Graphs, as I always wished someone would have written one when I started programming games 10 years ago.

Posted by on

I have often seen projects make the same mistake that I just finished correcting in Break Blocks, which is allowing each gameplay object in the game/engine draw its own renderables to the screen. When the project is small, this works well enough, but once you have hundreds of renderables being drawn by 10 or more gameplay objects, you may run into a which one renders first issue. Obviously this can be improved by turning on the Depth option and assigning a Z value to each renderable, but this requires turning off any sort of perspective mode, which will not work well when mixing 3D objects in. The answer is a simple, yet effective, Scene Graph that orders all objects based off a Depth or Z value. With everything ordered, we no longer have to worry about ordering our gameplay objects or turning on the Depth buffer. We also have the added ability of grouping similar renderables together to reduce the number of texture swaps(as long as there isn't anything that needs to be drawn in between the similar renderables).

For many programmers, this is common knowledge, but for new programmers, this tutorial may be useful.

Follow Us

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.