Skip to content

Conversation

@caelunshun
Copy link
Member

@caelunshun caelunshun commented May 7, 2020

This PR implements survival mode. Resolves #40.

#213 is blocked on this as we are developing the design we will use to approach gamemodes, and moreover, how we will implement gameplay features with regard to component architecture. The current approach is heavily based on data-oriented design. Rather than checking a player's gamemode in systems, there are a number of marker components—e.g. CanBreak, CanInstaBreak, CanTakeDamage, CanFly—which describe the capabilities of a player. These are inserted based on gamemode on player join, but the architecture allows for extensive customization of functionality through plugins.

Ideally, we would have a /gamemode command, but this is blocked on #209 being merged. I may merge it early, depending on how complete people deem it to be. Currently, the only way to affect a player's gamemode is through the default-gamemode setting in the config or manual editing of the player data files.

Inventory handling

Only basic survival mode inventory handling (i.e. single clicks) has been implemented. I will hold off on the rest until our inventory indexing situation has improved.

Block breaking

Survival mode digging has been implemented, for the most part. All which remains is to write down the harvest tools for all blocks (currently, only stone and dirt are in the list). This file is in definitions/data/tool.ron.

@caelunshun caelunshun added this to the 0.7 milestone May 7, 2020
This does a bunch of stuff I'm too tired to explain right now. Will
write about this tomorrow.

Prototype implementation. Not clean. Has bugs. warned
@caelunshun caelunshun mentioned this pull request May 10, 2020
@caelunshun caelunshun marked this pull request as ready for review May 11, 2020 19:47
Using the build.rs script caused CI failures on Windows which I am
not planning to diagnose.
@caelunshun caelunshun merged commit b80ff00 into develop May 11, 2020
@caelunshun caelunshun deleted the survival-mode branch May 11, 2020 22:53
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

Successfully merging this pull request may close these issues.

Survival mode

2 participants