Sweet Squash
19th January 2025 - Present
Part of the NoNotParty Arcade project.
Developed to answer the question "Would Candy Crush still be fun if it was completely deterministic?". Thankfully, the answer to this was "Yes", and the game has now accumulated many additional mechanics independent of Candy Crush.
Making it Deterministic
I used the seedrandom package to generate the same random numbers based off a given seed.
However, there are multiple places in the game where randomness is required:
- Spawning new sweets as they fall from the top of the screen
- Shuffling sweets when no moves are available
- Determining which direction sweets slide diagonally into empty columns
- Determining which sweets are targeted in certain powerup interactions
Since I wanted the same sweets to spawn in each column during each game, each column has its own RNG instance to effectively simulate an infinite column of sweets falling down. All other randomness is generated from a shared source, which only occasionally results in RNG manipulation being required to get a high score in a level.