Alien Blitz 3d: most levels done, optimizing

Most levels done

Almost all levels have been changed to add some height differences. It’s always some small things but it renders better

capture_2014-06-21_17-04-19_0580_Alien_Blitz_playing_episode2_e02m04_

The bad thing about that is that it double the space needed to store levels. And as I also need to add the 3d models I might need to save some space somewhere else… I was thinking about putting the music files in an extra package (for free of course), to be downloaded separately. If I do that it also means music can be in an higher quality, so I will consider that.

Some levels in 2d have also been modified, usually correcting some small glitches I didn’t notice before.

 

Optimizing

I am currently trying to optimize loading time. I tried a lot of things and managed to reduce loading time for chunk creation by a factor of 2 on PC, when testing on Android it changed almost nothing.

So I began looking around logs and noticed lots of garbage collectors, and indeed I forgot to free the vertices list when building chunks which was using lots of ram. So a single line of code allowed me to go from 150mb memory to 20mb (it was not noticeable on PC as on PC 150mb is almost nothing). On the biggest level of the game the chunk creation went from 90s to 10s on the Nexus 10 (the nexus 10 seems to be worst when using lots of memory hence a bigger improvement) which is nice.

On my GS 3 the level that was previously loading in 30 seconds now loads in 20 seconds (less than 15 seconds if energy save mode is off, having the CPU @ max speed helps). The biggest level of the game now loads in 46 seconds with energy save mode off (21 seconds on the nexus 10, 11 seconds on the GS3 in 2D).
When loading new levels (when playing multiple levels before exiting) the new levels are quicker to load as 3d models are still in cache.

I hope I can improve these results again, it’s still a little too long.

capture_2014-06-21_17-08-36_0627_Alien_Blitz_playing_episode2_e02m06_

Comments are closed.