Fiptubat 0.4

Finally, Fiptubat has reached version 0.4! The full list of fixed issues is here, but here’s the main ones.

Humanoid enemies

The big change was adding humanoid enemies that take cover. Finding cover was adapted from a very useful post on the Unity forums, which uses the following flow:

  1. Sample random (or not-so-random) positions around the unit’s current position
  2. For each sample position, find the nearest edge in the NavMesh.
  3. Obtain the normal field of the resulting NavMeshHit
  4. Remove any results that don’t point sufficiently away from the target direction
  5. Choose the closest.

It broadly works. Once they get to a cover position, they will repeatedly fire at their chosen target if they can see it, or reposition on their next turn.

Combat

Multiple fixes:

  • Turrets will pick the most exposed enemy they can find, rather than the closest. There is one slight caveat: this is based on the number of Raycasts that hit the target, which may result in things like this.
  • Suppression mechanics: dump enough ammo into the area around a target, and they lose their remaining action points. On their next turn, they’ll have half their total.
  • Turrets no longer have 2-D aim. This took me the better part of a day to fix, and was the last issue added.
  • Enemy units will try to relay the position of enemies to their comrades when spotting them.
  • Sidestepping is no longer a free action. It now works by shifting the player units a guaranteed distance forwards/backwards/sideways, with a cost of 4 action points per unit moved.

Other fixes

  • Toned down the sirens. Turrets still use this when spotting an enemy, but they have other noises. The humanoid enemies use a recording of Radio na Gaeltachta under heavy static.
  • The player unit’s current path is now visible as a solid red line. I would like to make it dotted and translucent behind objects, but that’s another issue.

The next release will probably involve character models and a larger level to play in.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.