Thanks and yeah, the sound on the roses isn't the most peaceful once they start stacking.
The dripping was done by having a "Metronome" in the background, which emits a signal Xms before each 8th of a bar. The signal has an integer argument saying which 8th beat it is representing.
A "DropEmitter" has a specified list of beats on which it will let out a drop. When it receives a signal, it checks the beat number against this list and if there's a match, animates a drop falling.
The drops are a bit of a cheat - rather than having a collider fall under gravity and detect when it hits a plant, a sprite is tweened (Tweens are something I ignored for a long time, but it turns out they're super useful) from the ceiling to a pre-specified "strike point" on a plant, or the floor level if there's no plant. Once the tween is over, the sprite is replaced by a particle effect and the plant's sound is played (with a pitch shift if needed).
Metronome.gd and RainColumn.gd are the classes that do most of the work, if you want to have a look at the source code (though it's not commented at all). I think my explanation makes it sound much more complicated than it really is - it's just a lot of little effects coming together.
Feel free to ask if you want further clarification!
← Return to game
Comments
Log in with itch.io to leave a comment.
its cute
very nice game ;)
this turned out better than I could of imagined! well done mate!
Likewise - you did a great job with all the atmospheric touches at the end!
Nice and peaceful...
Thanks and yeah, the sound on the roses isn't the most peaceful once they start stacking.
The dripping was done by having a "Metronome" in the background, which emits a signal Xms before each 8th of a bar. The signal has an integer argument saying which 8th beat it is representing.
A "DropEmitter" has a specified list of beats on which it will let out a drop. When it receives a signal, it checks the beat number against this list and if there's a match, animates a drop falling.
The drops are a bit of a cheat - rather than having a collider fall under gravity and detect when it hits a plant, a sprite is tweened (Tweens are something I ignored for a long time, but it turns out they're super useful) from the ceiling to a pre-specified "strike point" on a plant, or the floor level if there's no plant. Once the tween is over, the sprite is replaced by a particle effect and the plant's sound is played (with a pitch shift if needed).
Metronome.gd and RainColumn.gd are the classes that do most of the work, if you want to have a look at the source code (though it's not commented at all). I think my explanation makes it sound much more complicated than it really is - it's just a lot of little effects coming together.
Feel free to ask if you want further clarification!
what a beauitful game
Thank you!