Pokittris is the first ‘Tetris’ game for Pokitto. It is based on the code for ‘Tiny Bloks’ by myself for the Arduboy.
This is my second attempt at a tetris game, so please don’t be too harsh with the comments.
Please enjoy.

Pokittris Beta
Pokittris 01/10/17
Pokittris 02/10/17 - Latest version!

to hear the bg music in the simulator, copy pokittris.raw to the POKITTO_SIM\bin\Debug folder (I assume there’s a better way to do that, but I don’t know it).

As always, all comments welcome. and @Jonne - This one will probably run on hardware, nothing stupid going on that I can think of.

I just noticed I forgot to clear the score/lines/screen after game over, that’ll be done in the next upload.


That looks really good.
I like the solid blocks, all the fake shape in the gb one always annoyed me.

1 Like

It looks grand!

I would however make the background bricks brighter, or even only as outlines, because the dark bricks on the lower half might make it a bit harder to play on a small screen.

Alternatively, you can always make a call for some unobtrusive pixel art to be used as backgrounds.


@Spinal is the easing.h your own work?

Also, can I please add a bit of color?

I made a colorscheme like this and it looks pretty good

Line 391 in main.cpp:

    const unsigned short *p;
    pallet[0] = game.display.RGBto565(0xff,0xff,0xff);
    pallet[1] = game.display.RGBto565(0xdb,0x00,0xdf); //db00df
    pallet[2] = game.display.RGBto565(0xf1,0x8b,0x00); //f18b00
    pallet[3] = game.display.RGBto565(0x15,0xa2,0xa7); //15a2a7

Looks really nice with colors! Still, I understand that a monochrome palette has appeal to the GB fans.

Edit: There could be a selectable palette, and that could be saved to eeprom. Do we have API for eeprom, and some system so that we are not using the same slots with different games?


nope, easing.h is stolen from jquery. I changed it a tiny bit to be C rather than javascript, but other than that I did nothing to it. As for the colour, sure add whatever you want. There is a range of palettes already in the source, I do intend of adding a little effect just to integrate the colours into the gameplay a little more.


You have a color TFT and you want to make it look like a monochrome LCD? Yea, I guess it makes sense! No seriously: I am going to start constructing the games page within two days and Pokittris is a really good advert for Pokitto - but better when in color, IMHO.

1 Like



I know what you mean, you want to show off the Pokitto’s colour abilities because that’s one of its main selling points that sets it apart from certain similar devices.

But I must admit, retroism and nostalgia can sell well too.

Personally I think multiple colour palettes is the best route to go, since that gives you an extra feature to advertise:

“Pokittris, featuring multiple palettes: Technicolour and Retro”

(Please excuse the badly put together image, it was the best I could do on short notice.)

Somehow I’m not surprised.

Changing the state of variables mid-expression and code littered with magic numbers is the sort of thing I’d expect from a Javascript library.


Now I have a mindless urge to do exactly on hardware what you have shown in the picture, ie. graphics output split in the middle, with palette being flipped in between.


That’s completely crazy!..

Though probably possible.
A horizontal or vertical split would be easier than diagonal though.

Maybe add it to the ‘to do’ list and have a crack at it when you’ve got the bulk of the Pokittos shipped, or at least enough staff to handle it.

1 Like

Which is exactly why you should think before posting stuff like that here!

1 Like

It would be cool to have the ability to change the pallet in-game.


Its very very easy. But maybe its up to @spinal. “C” button is free


Actually, I have been messing with the code a little today.
Give this a try…


Once you play bad enough for the tiles to reach half way up the screen, the palette will turn red depending on how full the top half of the screen is.
Also, added the game over gfx. @jonne does it run on hardware?


Trying this on HW right now


Perhaps a video…?


Compiles Ok, 91kB… digging out a Pokitto


In fairness I just made the image as a sort of advertising gimmick.
I wasn’t expecting it to spark a “let’s make this a feature” vibe :P.


Runs very slow. Something wrong with Game loop timing.

Looks awesome though

@spinal if I press down to drop the block it goes fast, but the norma “fall is veeeery slow”

I suspect this has something to do with the easing?

1 Like