GuillemBarroso / CLing

2D survival game using command line
MIT License
3 stars 1 forks source link

Think how to implement global state/progress #32

Open GuillemBarroso opened 1 year ago

GuillemBarroso commented 1 year ago

Right now, everything is initialized from stratch. For instance, if the player breaks the wall of the first room and manages to scape to the second room, the wall will not be broken if the player decides to go back into the first room.

This makes me think that we should implement some sort of global state where we keep track of the player's progress.

We should also use this global state to, for instance, keep track of the player's achievements or discoverings. If he/she finds the recipe on how to build an axe to cut wood, this should be added to the player's recipe list.

Also, this opens the topic of how to save the player's progress between sessions. What are the key elements to store? Position, global progress, inventory, etc... This should be a separate issue.