On Game Maker and 3D

Posted by Rusky on Feb. 12, 2011, 8:24 p.m.

So, I'm doing some simple 3D graphics for my latest project. They're not strictly required but they make it look more interesting- it's essentially a top-down game, I just pulled the camera back a bit.

However, d3d_start() flips the handedness of the coordinate system. This flips the room editor upside down, which was okay for testing and I suppose for regular level design. I could have flipped the camera to the other side, but that would have screwed up depth.

Depth is effectively a built-in z variable which also happens to be used for drawing order, which works perfectly until you do anything slightly non-trivial (like flipping the camera to the other side of the z-axis). That was nice until I needed to sort drawing order independently of z value, for alpha blending and anti-aliasing.

Now I'm stuck with upside-down rooms even though I have separate z and depth. I should probably just go through with flipping the camera around by reversing all the signs again, but urgh. Why couldn't Game Maker just not flip the coordinate system so it could use depth as the z coordinate?

On a less hateful note, the lessons I'm taking from this are 1) always separate z and depth in GM 3D and 2) my own engine will not just tack on 3D as an add-on to the 2D stuff.

Also, I haven't been able to upload anything because my games are either too big or the connection is too slow for the server to get the whole thing before giving up.

Comments

Rusky 13 years, 3 months ago

I don't see why the ability of a tool or library is a bad thing. Even a "god tool" would require you to explicitly design the logic in your game. If I take your argument to its extreme, then we may as well go back to using hardware console switches to fill in memory with machine code. Obviously that's a bad idea, so why is it a good idea to go down the level of C++ where you have to deal with manual memory management, texture formats and game loops?

Now of course I don't mean to say that nobody should ever learn that stuff. Someone has to write the tools, somebody has to maintain the tools, and understanding the tools is both fun and useful. There's absolutely no reason to eliminate that level of detail. All I'm saying is that there is absolutely no reason for it to be required for every programmer to deal with it all the time, and also that there is absolutely nothing wrong with having a "god tool."