Capture Logic

Friday, 27 May 2016

Today we're looking at capture logic:

Both the art and code behind capture points changed multiple times over the game's development (and still has some changes to go) before coming to the state it's at now. In the current iteration, we've settled on this push/pull design with directions and destinations.

For this example, we use Team Red and Team Blue, but this math works with any number of colors or players. Placing a unit on a Neutral un-owned capture point begins the capture process; filling a bar until its full and giving you control of that point.

Captured points provide income over time to their controlling player or team, or in the case of Factories, Seaports, and Airports, construction of Land, Sea, and Air units.

What happens however if your capture doesn't go off so cleanly? If your unit stops capturing for any reason, there is a short delay whereupon it begins de-capturing back to whatever it's default state should be; neutral or team-owned.

 If your point is almost captured back to Neutral but not completely pushed there, you can recapture your own point back faster than if you let it go completely to Neutral ownership and start to be captured towards the enemy team.

With a push and pull perspective, the point is always pulling towards a state, and units can either fight against this flow, or ride with it, aiding it to get to its destination even faster.

In the above design sketch, in examples A and C, the point's native recapture speed is suspended as the unit performs his capture. Unit capture speeds are based on how much HP the unit has; damaged units capture at much slower rates than healthy full HP units.

In B and D however, the capturing unit is actually assisting the point's inherent capture speed, adding his own speed to the mix and incentivising you to assist in recapturing points rather than just letting them time back out naturally.

No comments:

Post a Comment