UI is in!

edit: the formatting is all messed up. Sorry.

 

Making some progress! With the UI boxes set up, I’ve realized it’s looking a bit more like a legitimate game, which is really exciting for me. Unfortunately, it just makes it more obvious to me though that I have so much work to do! Take a look:

I decided to redo the way I draw the sprites every frame. Initially I had the sprites load from disk every frame, and then select the appropriate sprite to draw, which was fine for just one or two sprites on screen, but as I put more and more baddies on the screen, it became clear that there was a massive performance hit, and I really want this game to run as best as it can, at least for now, since there aren’t many features. To make a long story short, instead of reloading the sprites every frame, I just save the sprites to the instance class, and pull the sprites from there, which is a better idea, because the sprites aren’t going to change on disk at all, at least while the game is running.

Moving forward, I haven’t done much reading into the theory of how to design a game properly, so I’m usually doing what seems like it would work in the short term, generally putting the long term out of my mind until I get a better idea of what I’m trying to do. For example, my modules are really just split into smaller parts in no particular order; they’re just split up in a way that makes it easier for me to find the function I want to. I’m sure I’ll have to move stuff around later.

Also, I’ve fixed the bullets not rotating properly, and I added the exhaust flames to show only when the actors are moving, which I think is a nice touch.

As far as game basics left to go, I haven’t even touched AI in months, so the NPCs just sit there, facing right! I still haven’t implemented delta time (if that’s the right name for it), so if my logic starts getting slow, my whole game gets unresponsive, which isn’t good, for the obvious reasons. I’d like to implement a stats screen that you can open up on the fly too, so that means I need a way to pause the game, which means I need to implement game states. That is to say, I need to be able to tell the game when it should try to move the characters or keep ‘em still. Hopefully that won’t be too tough of an issue.

Leave a Reply

Your email address will not be published.