Commit fc3bd1d.

I have worked on several games that suffered from major performance issues due to render breaks. A render break occurs when the graphics card has to discard texture memory or otherwise pause and reload data in order to render part of the screen. Examples of things that cause render breaks are: switching textures, switching blend modes, switching render targets and possibly other things. Honestly, I don’t know a ton about the gritty details here. What I do know is that a really big way to cut render breaks is to use spritesheets.

BattleCrypt has used a single spritesheet from the beginning. This allows the gpu to keep a single texture in memory and just draw parts of that texture to the screen for each individual sprite. I started out with a 1024×1024 texture. But BattleCrypt is growing significantly in the volume of art.

I have no plans to target mobile devices for this version of BattleCrypt. I can’t imagine how I could keep the game what it is for mobile and deliver a control scheme that is fun to play at all. If there is a mobile BattleCrypt it’ll likely be a completely different game, optimized for that screen size and input options.

Almost all modern PC graphics cards can now handle 4k textures (4096×4096). Since I’m not targeting mobile, this texture size should be supported by almost all machines. So, I have been working on updating the spritesheet to 4k size. This should give me ample room to expand the amount of art in the game but still keep everything in a single texture.

Unfortunately, this requires me to rebuild tilemaps, rebuild levels, remap every sprite in the game, etc. So it’s been a pain in the butt. Also had some minor camera issues, level rendering and other stuff to worth through as a consequence of this decision.

But it will be worth it soon!

Categories: BattleCryptGameDev

Leave a Reply

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