NokiMo
relativisticgame
relativisticgame

patreon


Week 38: the robot's LED screen

I started the week by working on the shader code that renders the robot’s LED screen and I finally completed it. It was quite challenging to get the texture filtering right (antialiasing, mipmaps), but I got there in the end. I am attaching a video to this post showing the final result.

I also did some final adjustments to the build system to support Emscripten builds. This was mostly about detecting changes in the assets and convincing CMake to rebuild and repackage them when necessary.

I also created a short video and published it on Twitter. This was accompanied by a Patreon post. I published the latter on the 18th of July with the title “Designing the main character of my game”. It was quite a few weeks ago… yeah, as you can guess I fell a bit behind with the writeup of the weekly progress updates 😛

I spent about one day of the week doing calculations to figure out how the Physics of LED screens would work in the game. I imagined having a video signal emitted by a moving body, i.e. the transmitter, and having a screen, i.e. a rectangular grid of pixels, that would sense the video signal. Each pixel of the screen would show the content in the signal as soon as it reaches it. This would look a bit like a wave propagating across the screen at the speed of light. I worked out how this could be implemented and proved mathematically that no matter how fast the transmitter and receiver move (< c), the signal is always received in the order it is transmitted.

I implemented functionality to allow drawing things on the robot’s LED screen, including rendering text and, crazily enough, I created my own bitmap font. The bitmap fonts I found were a bit too big for the Robot’s 32x32 pixel screen and I don’t want to make the screen denser, as then the individual pixels cannot be seen at all. To be honest, I spent only a couple of hours, maybe 3. The font ended up being a JSON file, as JSON parsing is nearly for free in my game engine: I can load a data-structure from JSON given its type, thanks to a reflection mechanism that sits at the core of the game engine.


Related Creators