The boring side of (bad) OpenGL game development

For some time now I’ve been working on porting my “first” game (there are some prototypes that shouldn’t be considered), Loneliness, from Flash to Windows. The tools I chose were C++, SDL (a combination I had previously used) and OpenGL. The engine is almost in a functional state, which means the game is almost looking the same as it’s web version. Behind the scenes, though, there are many completely different stuff, not only for the hardware accelerated stuff.

Something that is really bothering me is the use of a single texture. I find the use of an texture atlas fun and interesting, but having to centralize a 20×24 sprite in a 32×32 square somewhat annoys me. I actually don’t know if this is necessary, but I remember reading about it fastening renderization. Another thing I may be doing unnecessarily is to keep (almost) every tile in a single texture atlas (I’ve yet to use glDrawElementsInstanced or any other function call that should make batched draw), but that’s something I wanted to do.

The real problem isn’t actually having everything in a single texture, but not being able to procedurally draw stuff. In Flixel, there are some functions to draw on a sprite. This was used in the game over screen, to display a simple window. The way I have made things so far, I can’t actually do it (in a pretty and not hack-y way) without adding the full window sprite (it should be 128×128) to the texture atlas or by implementing tilemap. I could implement it (it actually already has been implemented, but for text), but I’ve been too lazy to do any of those lately. But I’ll do it… eventually…

On a side note, my last LD entry is on hold until I finish this game (and probably another one). It’s a nice li’l game (I liked it quite a lot), but I still haven’t made enough upgrades no call it a decent post-compo version… It’ll will be done when it has to be done, and I hope that time is before December.

Too sleepy right now to proof read this (and if I did, I would probably discard it). So I blame the sleepiness and rush in which this was written for any mistakes.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s