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

Localized reinforcement decay #56

Open
Maxopoly opened this issue Oct 4, 2020 · 0 comments
Open

Localized reinforcement decay #56

Maxopoly opened this issue Oct 4, 2020 · 0 comments

Comments

@Maxopoly
Copy link
Member

Maxopoly commented Oct 4, 2020

Instead of a single global timer I want localized decay.

Keep a bitmap of the map with a resolution of 512x512 blocks to one pixel. Values in the bitmap are timestamps used for decay.

Players will update the timestamp for their own 512x512 region and all adjacent ones (3x3 field of 512x512 sections) whenever they login or cross a 512-border (make sure to exit moveevent listener early).

Use HashMap for in memory storage, assume most groups have no time stamps for most regions. Standard db table for persisting.
Also add a config value to use as fallback for when no timer is known to avoid all reinforcements initially being fully decayed when this is put on the live server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant