Progress Update 13th August 2019

New Artwork

I’ve been hard at work learning how to do pixel-art. I present you with my new “ship crashing into a sun” artwork:

New Ship

This is replacing the old artwork here.

Old Ship

I think it’s a big difference. I know that the pixel-art probably isn’t very good, but I’m proud of it. I’m a little concerned about the amount of time it took, because that means it’s going to be a long time to get enough content together to actually release a game.

From now on, I don’t think I’ll share any new artwork, so as to leave some stuff as a surprise.

Transparency Fixes

I finally fixed a long-standing problem to do with transparency in the game. Basically the OpenGL Blending functions I was using was causing the semi-transparent parts of textures to be reduced. This was due to a bit of offscreen rendering that I was doing onto fully-transparent textures, which allowed for my effects to work.

The fix was to just draw a big black rectangle on some of those textures so that they were no longer transparent.

However: I still have an issue with the OpenGL renderer to do with text. If text is anti-aliased, it won’t render correctly due to the semi-transparent pixels used. I don’t need to fix it for The Last Boundary because it’s using a font that doesn’t have any anti-aliasing when rendered at the sizes I use. But it will need to be fixed for future games.

Animation

I’ve added animation too now. The event backgrounds can be animated. The big blue sun you see there is actually animated; it actually runs for about 13 seconds, consisting of 45 frames. I need to improve the animation a lot; for now, I’ll leave it as is, but I’m looking into how to make the little flarey bits around the sun animate nicer, it’s a lot of work, especially considering I’ve never done art before and I’ve got a big canvas there to animate.

Resource Manager

I’ve improved the overall game engine as well by adding a Resource Manager. Originally I didn’t have one because I didn’t think the game was big enough to really need it. 

The game probably still isn’t big enough to need it; but the reason I added it was because I wanted it to have a really nice feature. The ability to reload resources while the game is playing. What this let’s me do is reload an animation, or a texture, or a frame of animation, a sound, anything, and the game immediately change.

So I can leave the game running on the above screen with the spaceship and sun, and just edit the animation a little in Aseprite and then instantly see how it looks in game. Very powerful, and really improved my workflow.

The way the engine handles this is now, instead of some code having some TextureData that it had before (which was a struct with the GLint of the texture and some metadata); it instead has a ResourceHandle<T> (which is just a shared_ptr<T>). That way the manager, as a global static class, can just reload as needed (every 10 seconds for example), or at a button press. Anything with that handle instantly gets updated.

It’s been coded in such a way that any resource type that needs to be managed, just needs to declare it’s own specialisation of the ResourceManager template class as a typedef, and provide some static function ptrs.

That’s it for today.

Leave a comment

Your email address will not be published. Required fields are marked *