State of the Game #136: Howitzer/Rocket changes

This week I was focused on adding in batter support for long range, indirect fire, weapons, namely the howitzer and the quad rocket packs.

The goal was to change the way they fired to allow more consistent ‘ranging’, basically allowing you to place rounds in the same general area over and over. Part of this included a range estimator integrated into the crosshairs of the weapons.



First up on the list are the changes I made to the physics model. Before, both weapons relied on a pure physics model, with additional forces added to try and make the projectile arc fit a better gameplay curve. Unfortunately this was really difficult to tweak and always resulted in very unnatural arcs.

The change was to remove the pure physics model and instead us fake-physics which force the projectile along a modeled arc. This gives me absolute control over the arc and allows me to control the shell enough for the range estimator to be accurate to within a few meters.


Sticking with the theme of curves, I also changed the damage falloff values to be no longer modeled in pure math but also uses a predefined curve. This resulted in a MUCH better feeling for splash damage and making both weapons significantly more powerful



The last piece of the puzzle was to implement an advanced crosshair to allow the range information to be available to the player. I was able to create a full system that would also support more advanced crosshair interaction [like animation] but unfortunately I ran into a show stopper bug that I have yet to resolve. The issue seems to lay within a weird interaction with unity render textures and unity’s default UI system. Instead of drawing the great crosshair to the screen, all it will draw is a big black box. I have a support ticket open with unity about the issue.


In the mean time, go grab the 0.5.20_10 snapshot update and let me know what you think!

Leave a Reply