It’s my own damn fault for not paying attention to the little details, I know. But it was still annoying to find that even though Unity4 supports terrain objects on mobile devices, it doesn’t really “support terrain objects on mobile devices”. As soon as you include a terrain object in the scene, frame rates drop to “unplayable” and none of the kings tweaks or any of his optimisations will bring it back above 20fps again (if anyone thinks differently, please do let me know how you made it work).
So, after cursing for a little while, I accepted my fate and threw away the 30+ hours of work I’d spend getting the terrain just like I wanted it. The replacement is a flat plane which came with the obvious problem of how to create holes. It’s easy enough to add geometry on top of the plane (like the rocks in the screenshot), but when you have objects that extend below the plane (like the crater), it doesn’t really work. I considered custom building the plane geometry at run-time, but was a little concerned with the potentially growing triangle count, so I ended up using a custom shader that allow me to “paint” holes in the plane at run time. While not as pretty as the terrain, it sure is a helluva lot faster.
I’ve done a lot of work on weapons and enemies and am quite close to having something playable – the environment is still a little pale, but since it’s purely for decoration, I want the gameplay done before I start polishing it.
So far the armoury includes 3 automatic sentries: The obligatory mini-gun, a flamethrower and a rocket launcher. The rocket launcher uses the Unity physics engine for rocket movement, creating some funky trajectories. On top of this I’ve added two manually controlled weapons to involve the player a little more in this aspect of the game: The plasma canon is the surgeons tool to take out individual enemies while the not-so-subtle “Artillery” covers and entire area in a mayhem of fire and debris for a short period of time.
I’ve added limited ammo, including clips and reload delays to all weapons. This was not in the original game, but it’s another parameter to adjust when balancing the game later, and I think it will come in handy. I will also add the option to turn sentries on and off to make the most use of whatever ammo you have.
The beasts fall into two categories: Walking and flying – both are done and working, although the flyers still need some tweaking… I have 6 unique beast types in total, 4 walking and 2 flying – some of them will be included in various skins with different attributes.