Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bee fields can't merge. #7862

Closed
kevingranade opened this issue Jun 5, 2014 · 4 comments · Fixed by #64679
Closed

bee fields can't merge. #7862

kevingranade opened this issue Jun 5, 2014 · 4 comments · Fixed by #64679
Labels
<Enhancement / Feature> New features, or enhancements on existing Game: Balance Balancing of (existing) in-game features. Game: Mechanics Change Code that changes how major features work (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@kevingranade
Copy link
Member

i added bee fields as a source of danger for the granade item to balance the unintended stat-roulette effect it had, but I don't want to include them anywhere 'serious' in the game because there was a technical issue I couldn't solve.
I couldn't figure out how to get bee fields to merge without having them move at different speeds based on which direction they were moving.
specifically, if a field merges with a field south and or east of it, the field it merges into will be processed again, and move in the same direction, but if the field moves north or west this doesn't happen.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@kevingranade
Copy link
Member Author

Looks like this needs to be a two-pass algorithm, first build a list of moving bee fields as we iterate over the map recording each source, destination and density, then iterate over each of those at the end when we can track "how many bees" we expected to move from point A to point B(ee).
for example, say there are two fields of density 1 at 1,1 and 1,2, and the player is at 1,4. The bees head toward the player, so we record:
{{1,1}, {1,2}, 1}, {{1,2},{1,3}, 1}
after processing the first, we end up with a density 2 field at 1,2, but when we process the second entry, we note only one density of field was supposed to merge, so we split it back into a str 1 field at 1,2 and a str 1 field at 1,3.

@Leland
Copy link
Contributor

Leland commented Aug 16, 2017

@kevingranade this is one of the oldest issues on the repo - you want to keep it open?

@kevingranade
Copy link
Member Author

kevingranade commented Aug 16, 2017 via email

@kevingranade
Copy link
Member Author

Removing in #64679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Enhancement / Feature> New features, or enhancements on existing Game: Balance Balancing of (existing) in-game features. Game: Mechanics Change Code that changes how major features work (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants