All posts by Tomáš Andrle

D2 log 048 – Load time improvements, pt.2

I did some more loading optimizations.

Last time I managed to make nice improvements by using multiple threads. As I’ve been adding more and more assets, the load time has crept up again since then. 

This time I did two things.

Instead of decoding all PNGs and cropping them on each start, I do it once and write the result to disk as cache. Next time I just compare timestamps and load the processed image directly. This is much, much faster. The final release will have only the processed images in a PAK file.

Second, I profiled the startup sequence and found that a lot of time was spent building fonts. In particular, it was the Material Icons font, which isn’t even used when the game is run normally – it’s only for editor icons! I wanted to keep dynamic loading for the other fonts so I just replaced the few icons I actually needed with prerendered bitmaps and got rid of the icon font.

Loading times are really quick again which makes iteration much more pleasant.

D2 log 047 – Sentry turrets

New graphics for a static enemy unit that’s actually been in the game for a while.
Do not touch. It gets angry!

The sentry turret is a big chunk of solid cold steel. When it smells danger, it gets mad. We don’t know how it works. The aliens probably don’t know it either. They just place these things around their camp site to keep them safe. Except they don’t, of course, because you brought grenades with you. Right? Right!?

D2 log 045 – Episode selection screen

Finishing the episode selection screen. Made a new Blender cover template, where each episode has its own scene and a single export command puts everything in the game.


Dots below the posters represent levels, filled ones are completed.

With the code & pipeline set up, I can focus on the content.

The missions in the first game were kind of all over the place. This time I’d like each episode to have a central theme with specific objectives to be completed over the course of 3-5 missions.

Q&A

  • Is there going to be an stealth mission? Haha, no, sir. We’re going loud.
  • Escort mission? Forget it.
  • How about a mission with a farmer driving a tractor and you sitting in the trailer and shooting things? Why not.
  • Do you need to get said farmer some beers? Yes!

D2 log 044 – Utility poles

Another small task off my plate: utility poles.

After putting together a quick moodboard, I started modeling the basic design and created a few different variations. I quite like the wood texturing on those.

However, when I saw them in the game I realized there was something missing. Wires! The poles look so lonely without them…

I could

  • Pre-render sets of poles with wires included. This would reduce variety and the textures would be much larger.
  • Pre-render wires separately, place them in the editor. Less memory usage but the size and direction is still fixed. Also extra precision work required for placement.
  • Dynamic wires.

I decided to make the wires dynamic.

The first thing I needed was to define anchor points for each pole to attach the wires. I did this in Blender by adding Empty objects and giving them custom names.

The Blender export script then looks for those objects and writes their projected positions into a XML metadata file.

The game loads the metadata, the pole rendering code looks for the nearest neighbour poles, tries to match their anchor points and renders the wires.

All of this took about 3 hours, one of which I spent hunting down a problem with the anchor locations. It turned out I had changed their parent nodes in the Blender hierarchy and the parent inverse offset was wrong.

D2 log 043 – Road signs

Another small task done: road signs. I went looking online for good textures or vector shapes of US road signs and found a great resource here. Picked a few that I liked and put them on 3D models. I had to do the rounded corners and UV maps for each sign separately to match the curves precisely. Not that anybody will ever notice at this scale. It’s just something that had to be done. Quite a tedious process, but good for podcast listening.

App Store Review

I just got charged 0.30£ by Niantic, the publisher of Pokemon Go, to verify my age during the user registration process. The payment was initiated from the iOS app and done through a web form. No IAP.

Now I can only hope Niantic doesn’t charge me for something my kids do in the game.

This is exactly the kind of thing I fully expect Apple to protect me from.

Yes, AppStore Reviews Should be Stricter.

D2 log 042 – Icon

I made the first draft of an application icon for the game. A small but rewarding task which got me the following:

  1. Some idea about the icon itself
  2. Blender export pipeline
  3. Script that scales the icon into all required dimensions & writes icon metadata

Now I can tweak the model & lighting (as one does), push a button and get a fresh set of app icons for each platform.

Icons for my other games:

D2 log 041 – Logo animation

The logo animation is a rather small feature and it’s been a while since I put it in, but I still love it when I see it.

It’s designed to resemble a gun being reloaded – a clip goes in and one bullet is loaded into the chamber. Based on AK47.

I’m glad I took the time to do it early on. Devastro 2 code is derived from Superforce so it was important to make a clear step away.