Thursday, 25 October 2012

Continuous Space

Still too busy to be doing any coding on the strategy RL, but that should change soon when my work stops involving any coding for a few months. I did take the time to make a decision about the project's direction, though, which will probably lead to a rewrite. Long story short, the game was originally intended to take place in discrete grid space, and now it's going to take place in continuous space.


Initially at the very least, the game is supposed to offer a scenario in which undisciplined untrained hordes are able to defeat professional, but badly outnumbered, armies, with the forces gradually equalising as the members of the player's group die, gain experience, and retrieve intact equipment from their fallen enemies.

The game is not intended to be ultra-realistic in terms of modelling exact arcs of weapon swings and interactions between colliding materials, but it is supposed to simulate that kind of asymmetric combat in a reasonably plausible way. That is, something less abstract than attack and defence values and hit points; in a microcosm of the game where 2 or 3 unskilled fighters  attack a professional warrior (with DEF 10) and win/lose, I don't want the result, or the probability of the result, to be an obvious consequence of the unskilled fighters having 4 ATK and the other having 10 DEF, and them losing or winning because 2 times 4 is less than 10 and 3 times 4 is greater than 10. I'd prefer to have more realistic interactions along the lines of one of them being blocked by the shield, one of them either parrying or harmlessly hitting armour, and the third being free to concentrate on making a good hit without retaliation.

When scaling up this kind of situation to a smallish army and a large horde, the problems with simulating such a system on a square grid become apparent. A regular formation must either have a soldier in every tile, or every other tile. There are no alternatives in between. If dense formations are made standard, then the horde is unable to gain advantage by using a larger number of fighters per unit area. That is, unless they do strange things such as organising the battlefront into groups of three who each target the same enemy, they are unable to force the situation in the previous paragraph to play out. In contrast, a continuous space system with continuous facing angles would allow finer distinctions between formation densities and make situations like the above occur naturally. A penalty to freedom of movement when surrounded too closely would discourage use of excessively tight formations (at least, for the kinds of warriors that need space to swing).

Continuous space will also make mounted troops a lot more natural, since they won't have a one-tile-per-actor rule to break - they'll just have a differently sized collision box. I had trouble imagining how to implement polearms in gridworld, since they would extend for more than one tile. In continuous space, the simulation of how they restrict movement and the ways in which a charge might, with losses, get through a pike wall, will be a lot more natural.

For troops organised enough to sit in box formations, a continuous world allows them to maintain a consistent frontier while marching in non-cardinal directions. Depending on how the maps are constructed, it could also make for much simpler field of vision calculations.



No comments:

Post a Comment