Animated Textures and Bug Fixing

This week I managed to solve all the issues I had with the Unity3D Editor(s). That involved switching back and forth between editor versions until I settled with the latest Unity3D beta, which, ironically, was the one that gave me less trouble. This latest beta version even seems to have improved the game overall performance, which is super nice. Although I hope a non-beta version gets released before work on 0.3.3 is complete.

With that out of the way, I can finally showcase the improved map rendering feature. Here's a quick video to showcase it:

The main deal here is that I no longer draw everything into a single texture, which was highly inefficient and cumbersome. Instead, the map, it's overlays and the cell activity are all rendered in separated textures and material. This has a bunch of advantages. Now there's no need to redraw the entire map every time a new overlay is activated. Also, overlay painting is simplified by not having to manually combine the colors of the terrain with those of the overlay.

To make this work I had to add a bunch of texture shaders that allow me to filter the surface colors in one single step. This, by the way, can be done differently for every overlay, again, without the need to redraw the surface terrain. The introduction of texture shaders also gave me the opportunity to play with shader programming, which allowed me to introduce an experimental drainage animation texture showcased in the video. This particular experiment opens a lot of opportunities for more graphical fanciness in future updates. Now, the big drawback of shaders is that they are very hardware dependent. So they might not work on every graphics card. Though most of them shouldn't have any issues since the shaders are rather simple.

Like I said, this was something I had almost fully ready last week. So after being done with the editor shenanigans, I started testing and bug-fixing in earnest. The first big issue that I tackled was game save serialization which, with all the version updates, got broken completely. So I had to rewrite quite a bit of code to get it all working again. Next weekend I'm going to continue testing and fixing all high priority issues. All of this is possibly going to take another 3 to 4 weeks. Although, I have a small trip planned for the end of October. That means that I won't be able to release this game until possibly the second week of November. It all depends on how smoothly the bug fixing process goes.