What I did to write a Falling Blocks game
And rather than re-inventing the wheel, or converting the applet or starting from scratch, I found this amazing video tutorial which talks you through how to build it in about 1 hour:
Here’s the game in playable form
Bugs and changes
- Change – I added detection for the ‘up’ key – so that would rotate it not just the rotation keys.
- Bug – With not enough colours (1 too few) some of the blocks were disappearing then reappearing, by making sure the number of colours was correct this fixed the problem – and the block string
- The blocks were sometimes falling through the bottom – that was because I needed to replace the drop code with ‘playerDrop();’ and that resolved the problem
Thank you to ‘Meth Meth Method’ for providing the tutorial video and helping me develop the code from your tutorial!
On the to do list now is a sonic or mario style platform game, a Pac Man or ‘Oh Mummy’ style collection game, a outrun type racing game. I’d also like to create a version of a board game (one of the those escape room ones).