Z3D Engine released


Today I released a "fake-3D" engine for GameMaker Studio that I've been developing for several weeks. I've been developing this as part of a larger project, but it is intended to be flexible and re-usable.

GameMaker Studio supports 2D games, with built-in variables for x, y, xstart, ystart, xprevious, yprevious, hspeed, vspeed, gravity, and so on.  It's a commonly known technique in 2D games to  set the drawing depth  in such a way that objects at the top of the screen (further away from the player, closer to the background)  are drawn behind objects in the foreground.  This is known as the "depth = -y" technique. It's been commonly used in classic 2D beat-em-up games, such as Double Dragon, River City Ransom, etc.

Z3D Engine improves upon this by adding a true z variable, and supporting variables that work in much the same way as GML's built-in variables for x and y:  z, zstart, zprevious, zspeed, zgravity.  Depth-ordering is handled by the engine, as well.   A single instance of the z3d_engine object acts as a controller for z3d objects, automatically updating these built-in variables each step. The way this is implemented makes it easy for the developer to add children of o_z3d, coding its behaviors without affecting the way the Engine manages the object. I've made the code as simple and performant as I can,  but I know that there is still some room for improvement with the way the drawing system works, which I will be working on for a future update.  Currently I'm using a priority queue data structure to handle depth sorting, but there are other techniques that are more efficient and scale better, and I am working on updating Z3D to implement these improved techniques.  But because the basic movement engine is working correctly, it's ready for use now.

I'm particularly proud of the coding and documentation that I've produced for this asset -- if you're a GameMaker Studio user  and are interested in advanced programming techniques, coding style, and expressive code, I humbly recommend checking out this project. 

The documentation goes into full detail about how the engine works and how to use it.

Buy and Download Z3D Engine and try it out.

Files

Z3D engine.gmez 19 kB
Feb 05, 2018

Get z3d engine

Buy Now$5.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.