Trouv / willos-graveyard

Sokoban puzzle game made for GMTK 2021 game jam - Joined Together
3 stars 0 forks source link

refactor: add Volatile plugin abstracting death-on-contact logic #127

Closed Trouv closed 12 months ago

Trouv commented 12 months ago

The game design of willos-graveyard is being adjusted. One change is to introduce an potential lock/key mechanism to the game. This will come in the form of gravestones/exorcism tiles destroying each other on contact. The thought is that this logic is similar to what happens between willo and exorcism tiles on contact - it's just that the meaning of "destruction" is different there. So, the purpose of this PR is to abstract the idea of "death on contact" into its own component/plugin.

The result is the Volatile component/plugin. Volatile entities are initially Volatile::Solid, but when they contact another Volatile::Solid, they both become Volatile::Sublimated. For Willo - this means game over. For exorcism tiles - this means going invisible and no longer being destructive. And, in a future PR, gravestones will also go invisible and stop having sokoban logic.

These values are tracked with HistoryPlugin and respond to history commands appropriately.