Controls
left/right: moves block left/right 1 position
down: moves block down (holding this button keeps on moving the block down)
A: rotates block
B: stores block
C: starts a new game
Source code
This game is a port of a windows game that I once made by following this tutorial` by Javier López López
I hope to add some music/sounds and a high score table later.
edit 24/05/2018: high score table has been added.
I have just uploaded a new version: The high scores are now saved in a high score table on the SD card, thanks to @Pharap and @Hanski. See first post for the binary.
Would you like to add some music? It’s dead simple:
put
game.sound.playMusicStream(“music/yourfile.snd”); //before game.begin!
…
game.begin();
…
game.sound.playMusicStream(); // without parameters function triggers playback to begin
There is going to be a folder called “music” on the next game disk. There is some Creative Commons music + license.txt file where the licenses are explained.
To make a suitable music song:
Use Audacity to create a mono track (not stereo). Output the file as follows:
Yes indeed, this was the next thing I wanted to add.
Streaming music from the SD card is probably the easiest way to add some music. Is it possible to have different songs for different parts of the game (e.g. 1 song for title screen / menu, another one during the gameplay, maybe another 1 for game over, …)?
I also want to give the pokitto synth a try. The ultimate goal would be to create my own music.
It seems that it is a bit harder than expected… the loading/saving of highscores and streaming music seem to interfere with eachother (see also this topic: Issue with streaming music and using SDFileSystem)