Closed Asuza closed 6 years ago
@Asuza I'd like to work on this feature.
Thanks, @himanshujariyal. Let me know if you have any questions.
This is still a valid Hacktoberfest issue, as it was never completely finished. Feel free to either start from scratch or use the existing PR from @himanshujariyal.
I'll take a crack at it this year. 😄
@Asuza PR is up for this issue 😄 Please take a look and let me know what you think 👍
Enhanced via #26. Thanks, @redice44!
Currently, players are placed in random locations on the map. Continue to allow this (see https://github.com/JSJitsu/ai-battle-engine/blob/672fd5bdeb1503bc4063aebda2e88eacec3cf87e/index.js#L166) but also allow maps to contain an indicator that a specific block is a spawn point.
For example, if a map looked like this:
The engine should put team 1 players into S1 tiles, and team 2 players into S2 tiles. SP should place a player from any team in that tile.
If a map that gets loaded contains any spawn points, then the engine should not randomly place any players. There should also be a safety check that there are enough spawn points for all players, and if not, log an error and fall back to random placement.