For this post, I’d like to talk about a minor tweak I did to Play The Field whose aim was to improve the gameplay.
Like most Real Time Strategy games, units in PTF have a maximum attack distance. This means that if an enemy comes within that range, they can attack (and unless ordered otherwise will attack).
Attack distance is especially important in this game because for many of the levels the player is forced to place units in very tight environments – sometimes in the middle of a group of enemy units just waiting to attack. This contrasts from most other RTS games where you have to create units at specific buildings.
By playing through a stage a few times you can figure out roughly where this attack range ends, but each unit has a different attack range so memorizing all of them is tedious, and visually identifying where are safe zones can be hard.
After realizing this, I decided to put a visual indicator of each unit’s maximum attack distance. After some experimentation, I decided on a light grey sphere around the unit showing the “danger zone” of that unit. This was implemented with translucency (an alpha value), and an interesting side effect is that these zones visually combine whenever they intersect. For example, for the region where two zones intersect it will twice as bright, and so on.
This not only creates interesting patterns, but gives you different levels of safety based on brightness of the zone. Dropping a unit in one of the brighter zones means you would be taken out almost immediately.
At first, I felt that this graphical change would be a big too busy and detract from the game’s mechanics, but after testing it I feel that it doesn’t interfere much with the gameplay. This is probably because the game’s visuals are already extremely simplistic, with a completely black background.
See the below screenshot for an example of what this looks like: