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

Depletion frame calculation #2

Open
hallipr opened this issue Jun 21, 2024 · 0 comments
Open

Depletion frame calculation #2

hallipr opened this issue Jun 21, 2024 · 0 comments

Comments

@hallipr
Copy link
Owner

hallipr commented Jun 21, 2024

You should be able to statically calculate, for a given set of food and creatures, spoil rate of the food and eating rate of the ceeatures.

This means a trough can have a function calculateFrame(time, food) that returns the the food with spoil and depletion rates, and creatures with food, rate, age.

The next frame time would be the min of any food depletion time or creature age up time.

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

No branches or pull requests

1 participant