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

Enhanced Hunger Mechanics #50

Open
BenCheung0422 opened this issue Dec 24, 2024 · 0 comments
Open

Enhanced Hunger Mechanics #50

BenCheung0422 opened this issue Dec 24, 2024 · 0 comments

Comments

@BenCheung0422
Copy link
Member

BenCheung0422 commented Dec 24, 2024

Original: MinicraftPlus/minicraft-plus-revived#713

Background

Currently, the hunger system is simply just consuming hunger points by exhaustion time and whether decrementing consuming exhaustion time each tick. The system is quite unflexible when there are several actions that would "consume" exhaustion time in different extents, since it is difficult to set explicit values. Now they are mainly done by checking whether the current game time is a factor of 2 or random of a range equals to zero or such.

Details

By considering mature system like the one in Minecraft, the hunger system, the system can be expanded and standardized in a better way.

Exhaustion Levels

Firstly, turning the exhaustion time into exhaustion levels. The exhaustion level is checked and calculated each tick, so everything can be covered at once. Each actions and conditions would give different exhaustion levels; per a certain value of exhaustion levels, the hunger level decrements. This way, it can make sure that hunger exhaustion would not be too complicated or verbose, but instead more standardized and simple.

Food Saturation Level

Secondly, other than just the visual hunger points, there can be food saturation level. By eating food, the saturation level increases. In hunger level decrement, the saturation level is consumed before the hunger points. This can strengthen the effect of food saturation at the same time reduce the food demand. It is not necessary to visualize this value in the HUD like Apple Skin.

See Also

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