The advent of code day 15 challenge is about a map with goblins and elves they attack each other.
Would be cool if we can let Boulder Game emulate the challenge.
The challenge is following strict rules which allows us to mimic those.
Things that needs to happen:
[x] Different update loop strategy: The enemies get updates in a really specific order. The current update loop updates based on current position while their "update loop" goes based on the original position of the actors. Solution: Make sure the actor ids are set in the reading order. Then we can have a additional update loop that sorts the actors on id and then updates them in order. Best if we make it a "strategy" so that it can be configured which updateloop gets used.
[x] Enemies/Goblins should be able to target someone.
[x] They should move to the targeted enemy
[x] They should be able to attack each other
[x] We need to keep track off the "turns" (which can be a simple actor/component a bit outside the map)
[x] When x Goblins or X Elves died that the game should be over (Can be done with the event system)
[x] We need to gather some stats when the game is over (Who won, health left and turns taken). We do not care who won. We can just go over all actors that are left and sum their health (Only one type of enemy should be left). Multiply that with the counter from the counter actor. We can sum all those counters as well (Should be only one counter)
The advent of code day 15 challenge is about a map with goblins and elves they attack each other. Would be cool if we can let Boulder Game emulate the challenge.
The challenge is following strict rules which allows us to mimic those.
Things that needs to happen: