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

Open
kevingranade opened this issue Jun 5, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@kevingranade
Copy link
Member

commented Jun 5, 2014

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

This comment has been minimized.

Copy link
Member Author

commented Dec 22, 2014

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

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2017

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

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Aug 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.