So, a hypothetical turn-based, hex-based strategy game, with orders given by all sides, then simultaneously executed. The current concept is that each turn is divided into ten (or any other arbitrary number, really) of ticks. Each action a unit can perform takes some amount of ticks to perform, which includes movement.
Now, say, two units attempt to move onto the same field in the same tick. What happens? Random decision (or equivalently, decided by implementation details), neither gets to move, some other option?
If the second one, how to neatly summarize that behavior algorithmically?
Now, say, there were actions that can push away other units. Two units simultaneously attack a third one, but one does so with a pushback attack. Do both attacks hit? What if, technically, the pushback attack occurs first?
My current idea is to resolve all spatial changes (movement, pushback, pulls, and so on) seperately from non-movement (aka damage, mostly); meaning the "move" method available to action effects would really just enqueue a move action that would then be resolved between ticks.
Considering I want to maintain the constraint of no physical movement faster than 1 field per tick (that's still a maximum of 10 [/other arbitrary number] per turn), this raises another issue: What if the aforementioned two attackers both pushback?
Side-stepping this issue entirely would be introducing an always-resolving order of unit action resolution - but that feels kinda arbitrary (a "Speed" stat on units won't cut it, since I can't guarantee it will differ between untis). I may have to fall back on that, anyways. Though it might be excusable if it was a sensible order that is officially recognized as part of the ruleset.
So, yeah. Some input, please.
Edited 11 years ago
|