Blog:
Where I track my Progress and logged hours.

Archive:
Where you can obtain my completed projects and steal my rules for First Blood.

Project #14 Day #159

8 hours, universal spawn function.

The universal spawn function now can assign occupied tiles to the spawned tile occupier regardless of class thanks to the new iOccupier interface that has been applied to all bodies that occupy tiles. This interface has 3 functions baked in: pass occupied, release occupied and set occupied. Additionally, the names of variables accessed through these functions has been standardized across these actors.

When the combination of conditions given to a spawn function do not yield any valid tiles for the actor to spawn on, the function will drop conditions to widen the search. With each loop the lowest priority 'And' condition is dropped.

Instead of recalculating after each condition is dropped, the eligible tiles at each 'And' relationship cut off remain available for easy access as we reduce the number of conditionals we care about.

Created struct of 'spawn conditions' to reduce the size of the universal spawn function's node.

Project #14 Day #160

Project #14 Day #158