Firefly Devlog
I have started developing a game. Not just any game. A clone of my favourite game: Tetris.
I am developing this game for a console. Not just any console. A console that does not yet exist, but is currently being developed.
The console is called Firefly Zero and is completely open source. At least the parts that already exist. And that’s quite a lot: SDKs for a whole range of programming languages, CLI tools and - most importantly - an emulator.
At the moment, I’m programming in Go. Mostly in the evenings; let’s see how far I get!
2026
Screen Manager
I needed a more robust way to switch Screens. At this point in time I have three different screens:
- Start Screen
- Game Screen
- Result Screen (shown when Game Over)
Switching to those screens worked via a global variable. Game starts? var screen string = "start". Enter the game? screen = "game"… You get the idea.
The problem with this approach: it is surprisingly hard to keep track about what screen is supposed to be shown. This gets messy pretty soon, especially when those screens are stateful.
So I “invented” a ScreenManager logic, to register screens at startup and set the right screen when desired. This not only makes intent way more obvious, but it also allows for some screen-lifecycle. I can now react OnEnter() or OnExit(), e.g. for loading/unloading assets. This structure would even be sufficient if I later want to implement a “back” functionality. If anyone is interested, I created a barebones PoC here.
Change: oozwpxwk
Creating a Settings Screen#
Now that I have something to switch screens, I started working on a settings screen. This will be the screen to view or edit configurations.
Not exceptionally beautiful or even exciting. But it works and does what it is supposed to do. Everything design related is anyways a task on its own, that I successfully procrastinate…
Change: lkmypylt
Apotris
Today I learned about Apotris. My first impression? Fuck! Fuck is this good!
When I started developing I didn’t have the ambition to create the best Tetris clone out there. But I was convinced I’d have a few novel ideas at least. Turns out my ideas aren’t as novel ;D
Even the cooperative multiplayer is something thats already existing in Tetris Effect Connected, as I learned just recently (if you haven’t seen it, check it out!).
To me this brings up a question: why implement a new Tetris clone, if there is already a very good, open source, freely available one that got ported to other platforms already? Why not port Apotris to Firefly-Zero instead?
I havenβt looked deeply into the source code, so I donβt know whether itβs possible or how much effort it would take. Maybe someone will port it eventually.
I, for one, am having a blast implementing Tetris. It has probably been done thousands of times, but I enjoy thinking through the problems, even if other people have already solved them. π
State Drift
New entry for the devlog: We now have a proper distinction between singleplayer/multiplayer-coop. The later one is now also fully functional. For coop I implemented player-specific colors, so it is possible to see who dropped which blocks (will be configurable in future). Without it looked a bit “chaotic”. Also I think it will be cool to see “who is faster”. I also thought about making the block drop round based… But I feel like this way its more fun.
But oh no! The state drifts.

Gram told me I should be careful with getMe() calls outside of render(). Investigating…
References:
Cooperative Multiplayer PoC
Started tackling (coop) multiplayer… I broke quite a bit of my input logic (have yet to understand why), but overall it does what I expect !π
References:
Save Blocks
After going through the topic of SRS I have to admit: it feels like a totally different game. It is incredible how much this rule set pays into the tetris experience!
It definitely took a while to find a good way to implement it; but pretty happy with the outcome.
Oh, and you can now save blocks for laterΒ π
From a UI-perspective: do you prefer the save-block on the left or the right side?
References:
SRS Shenanigans
I was today years old when I learned, that my approach to dropping blocks is super naive. Hell, there is even an official Tetris guide on how blocks have to behave under certain conditions. They call it the Super Rotation System!π
It even seems to be some kind of common sense among Tetris conoceurs.
Guess I will implement it, as this would mean blocks in the game would behave as in every other modern Tetris game. Also things like T-Spins would be possible.
References:
It's a game!
Small update… already way more playable. Scores, line count, levels work. hard drop and drop shadow caused some headache today, but running fine now. Next I’ll probably dig into UI. A lot of things can be configured already, would be cool to do this from UI instead of code !π
References:
Humble beginnings
Over Christmas holidays I spend some time playing with the firefly-zero SDK. Over the weekend I took some free time to implement a Tetris clone. Parts of the game loop are already functional. My goal is to create a highly customisable version (configure block colors, enable games with/without save blocks, toggle next block preview, configurable number of rols/cols…), to make a more interesting version of Tetris.
Currently I’m struggling a bit finding a name… As I wanted to adhere to the firefly theme, I came up with “Luminos” (… Lumen, Tetriminos… get it? π ). The problem: apparently there is a board game with the same name. I still like it and use it as a working name…
Other names I came up with:
- Lumen Blocks
- Firefly Blocks
Some additional names the fine folks of the Firefly-Zero Discord came up with:
- Fourfly
- Firetris
- Tetrafly
- Flytris
- Lucitris
- Lucid Blocks
References: