| 219 | |
| 220 | |
| 221 | = Movement in detail |
| 222 | |
| 223 | == A: Corridor movement |
| 224 | |
| 225 | [[Image(A.png)]] |
| 226 | |
| 227 | '''Goals:''' |
| 228 | 1. The formation picks the direct path |
| 229 | 1. No units must turn around and walk backwards |
| 230 | 1. The formation movement looks natural |
| 231 | |
| 232 | '''Decisions:''' |
| 233 | Nothing to decide, the expected behaviour is quite obvious. |
| 234 | |
| 235 | = B: Corridor movement marginally obstructed |
| 236 | |
| 237 | [[Image(B.png)]] |
| 238 | |
| 239 | '''Goals:''' |
| 240 | 1. Same goals a s with A |
| 241 | 1. The formation moves around the small obstacle (fence) in the middle. Roughly half of the formation should move around the left and half around the right of the fence (when it's in the middle). |
| 242 | |
| 243 | '''Decisions:''' |
| 244 | 1. Formations are allowed to split up in order to path around small obstacles. They don't require a path for the full formation obstruction. |
| 245 | |
| 246 | |
| 247 | = C1: Too narrow target location (no alternative) |
| 248 | |
| 249 | [[Image(C1.png)]] |
| 250 | |
| 251 | '''Goals:''' |
| 252 | 1. The formation is allowed to move to the flag, even though there's too little room for the whole formation obstruction. |
| 253 | 1. The formation ends up with more ranks but less wide to fit into the narrow spot |
| 254 | |
| 255 | '''Decisions:''' |
| 256 | 1. It's allowed to move formations to a target when there's not enough space for the whole formation at the target location. |
| 257 | * Different behaviour would be a problem, especially with large formations and unrevealed territory |
| 258 | * It doesn't seem too difficult to achieve a reasonable behaviour in the vast majority of cases |
| 259 | |
| 260 | = C2: Too narrow target location (alternative path) |
| 261 | |
| 262 | [[Image(C2.png)]] |
| 263 | |
| 264 | TODO: This is where it gets difficult. Maybe this needs another testcase that elaborates on the behaviour. |
| 265 | |
| 266 | 1. Does the formation use the same behaviour as in C1 or does it try to position units outside of the wooden walls too, trying to keep the formation shape? |
| 267 | * Different behaviour might be wanted depending on how much distance (real walk distance, not linear distance) units have to cover to reach that spot. |
| 268 | * The player might not want units to walk through the narrow gap and take the way on the front if enemy units are there. |
| 269 | |
| 270 | |
| 271 | |
| 272 | = D: Partially obstructed paths with alternative |
| 273 | |
| 274 | [[Image(D.png)]] |
| 275 | |
| 276 | '''Goals:''' |
| 277 | 1. The formation picks the direct path (where the trees are). |
| 278 | 1. Movement looks natural (no units going back and forth for example). |
| 279 | |
| 280 | '''Decisions:''' |
| 281 | 1. Formations always pick the shortest path, even if it's partially obstructed (all individual units in the formation can pass, but not the formation as a whole) and even if a free (but longer) path is available. |
| 282 | * Different behaviour would not be predictable for the player and it would be very hard to implement a reasonable fuzzy logic that covers all the cases well. |
| 283 | |
| 284 | = E: Dense forests |
| 285 | |
| 286 | [[Image(E.png)]] |
| 287 | |
| 288 | '''Goals:''' |
| 289 | 1. The formation picks the direct path. |
| 290 | 1. Units pick reasonable paths to get through the forest and keep close together as good as possible. They try to keep the formation shape if possible, otherwise they just try to keep as close together as possible. |
| 291 | 1. Formation movement looks natural. |
| 292 | |
| 293 | '''TODOs:''' |
| 294 | 1. If formations move through dense forests or similar obstacles and units separate too much, this should have an impact on formation bonuses. Is it enough to use a rule like "if less than x% of the units are in their designated location according to the formation shape, bonuses do not apply"? |