Close

The actual game, isn’t that the easy part?

A project log for Jeu de luminographie

An electronic toy encouraging outdoor exploration

ayuAyu 09/10/2024 at 18:560 Comments

(Bangs head against table) Who thought using 8 KiB RAM to drive a 240×240 colour display was a good idea? Oh it was me myself. Never mind then… (^ ^;)

The reason I picked the STM32G030 was simple: I had spare pieces from a previous project lying around. With hardware issues out of the way, memory space shouldn’t stop me. All I need to do is simply to divide the screen into tiles sized 30×30 and implement a generic drawing interface to mark the dirty (changed) tiles, and blit and redraw them in order. One single remaining issue is that screen tearing happens, and DMA hardly helps with such small bursts of intermittent transmissions. But really, I don’t know why I chose to go through all this hindrance when I can just spend another 2 CNY (quarter USD) to get 16× as much RAM with a ’G0B1. That will hold an entire 16-bit framebuffer!

Compared to everything so far, the actual game was straightforward. It collects entropy from clock jitter and internal ADC channels, and generates a random pattern comprising three dots marked dark/light, which the player is asked to match with lights and shades. The pattern is chosen so that the nearest dots are at least 1/8 of the circle apart and have different dark/light markings.

This is actually only the most basic gameplay I had planned — as is present in previous photos, a compass is always on the display; there is also an accelerometer/gyroscope IC on the board. And finer sounds and graphics? There’s 2 MiB of flash sitting there! All those possibilities I think I need to leave for the next few days to come.

With everything going on in life (a concert band competition and a conference presentation!) and so few days remaining, this felt much like a little game jam. I had to hastily make choices among endlessly growing ideas and balance between a polished product and a minimally working prototype. That could be quite stressful, but now it’s playable! It is now a functional game, yet another time!

Unfortunately, it has been really cloudy all these days, so I am yet to find a great opportunity to put it into field test. For now, let’s ditch all the contest rules and just ship it 🎩🐿️

Discussions