[Game]Linez

linez_loop

banner0000
Linez is my first attempt to make a game for the Pokitto. It is in fact a tetris clone.

Binary
linez.bin (44.8 KB)
linez.bin (latest version) (77.3 KB)
linez.pop (126.9 KB)

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.

13 Likes

Will try this. I love the title screen!

1 Like

Excellent!
I was hoping to see at least one more Tetris™ game :slight_smile:

2 Likes

The controls are very responsive, feels really good.

1 Like

It plays very nicely on the console, good job! It just needs a Russian-inspired background music now :wink:

2 Likes

I was thinking of something like this:

but then maybe a chiptune version

2 Likes

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.

3 Likes

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:

Then, use following audio settings in My_settings.h:

#define PROJ_ENABLE_SOUND       1       // 0 = all sound functions disabled
#define PROJ_STREAMING_MUSIC    1       // 1 = enable streaming music from SD card
#define PROJ_AUD_FREQ           11025
#define PROJ_STREAM_TO_DAC      1       // 1 use DAC for stream, 0 = use PWM for stream
#define PROJ_GBSOUND            0       // 1 = use Gamebuino-compatible sound interrupt 
#define PROJ_ENABLE_SYNTH       0       // 1 = use Rboy-compatible sound interrupt
#define PROJ_USE_PWM            0       // 0 = Use only DAC for output

For free CC BY A licensed music check out https://ozzed.net/music/

3 Likes

CC BY or CC BY-SA?

CC BY-SA 3.0 … typo

1 Like

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.

2 Likes

Yes. Just use game.sound.playMusicStream(“filename”) in the same way when you change game state

1 Like

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)

1 Like

Added a pop file now…

4 Likes

Added gameplay loop gif (hidden at the beginning)

2 Likes