Sunday, February 2, 2014

The long overdue post

As the title says, this post is long overdue.
Several years overdue, to be perfectly honest, but i was stupid and overly confident. So let's say that i should have written this a month ago, when i actually realized what i've gotten myself into.

My grand idea of making an engine that would cater to my every need before i needed or even knew what i'd need is just dumb. I'm just one man working on this, and here i was, dreaming i could make a simple engine that could make any game, without making a game. Such contradiction. Much dumb.

So after a smallish amount of time (around 5 years) i finally dropped the engine project.
It's for the best, really. I was too focused on making an overly complex system for making entities without actually using it in any meaningful way. The component based entity systems are great, and i definitely see myself doing them at one point, but not now.
Not for simple games.
Not for games that have only 4 unique objects on the screen.
Not for games that are so simple that it takes one source code file to write them (802 lines long and written absolutely horrible, but still...).

So now i'm making games instead, and letting an engine grow from them. I'm not running in blindly though, the last 5 years have been extremely helpful, as i've learned a lot to help me make the right decisions about the structure of code. I made Pong from scratch using this knowledge, and scraping bits and pieces of my previous code so wouldn't have to write it again, and i've done it in a month, laying down the foundation for any next game.

I made a simple graphics system which allows me to draw lines, color filled or textured rectangles, and the latter also helped to make a simple font engine (Direct3D11 API doesn't have a premade easy-to-use font drawing capabilities, which sucks big time).
I made a simple windowing system, which also has the capability to monitor a certain directory for any file changes, and promptly notifies the game in such an event, so for instance, assets (textures, sounds, models, etc) can be reloaded while the game is running.
I made a simple scripting interface around Lua, and used toLua++ library to automatically generate bindings so i don't have to write them manually (it gets really tedious). I used the scripting interface to implement the AI for the right paddle, which was really fun, finding the right logic to make it track the ball in a non-twitchy way.
I added the Box2D physics library to make my life easier.

All in all, a lot of stuff is now there to help making the next game much easier and faster. I still have one thing to add to Pong, which is sounds, but that's almost a no-brainer since i already have FMod downloaded and ready to go, i just need to give it a home somewhere in my code.

That's all for now. I'll try getting back to weekly posts again, to help track progress, which should now be more... obvious?

No comments:

Post a Comment