blog > "metro", an 8KB executable demo (20 July 2022)

"metro", an 8KB executable demo

still image of the demo, showing a subway tunnel

This post is pretty bare-bones. I'll hopefully expand it at some point.

Index

Index #

Index

What #

This is a 6.552 bytes Windows executable demo, made by me, released at the Black Valley 2022 demoparty.

Index

Tooling #

After prototyping the rails on Shadertoy, I wanted to make some tool to edit the shader, mainly for easily controlling variables and because I wanted to use vim bindings because I'm very used to vim and I feel less efficient without it.

I made this in Java, simply because I know Java pretty good so I can get going quickly, and I have worked with LWJGL before (a lib that allows using OpenGL). It has a canvas with OpenGL contex, some sliders to tinker with some values that are passed to the shader, and uses a file watcher so the shader file gets read and recompiled whenever that file is changed. I also added mouse and zqsd/shift/ctrl input in order to move around the scene. (zqsd because I use azerty keyboard layout)

Then I also added a camera path editor thing, because I thought I wouldn't be able to come up with good camera paths by just making some cool mathematical equation, so this one allowed me to use bezier curves for xyz and rotation values.

Index

Graffiti #

For making the graffiti, I also made a quick tool to position some cubic beziers and then output the coordinates of the (control) points, to paste them into the shader.

screenshot of a program that draws beziers with controllable control points

For every frame, the position in the chain of beziers for the current time (minus and plus some small value) is calculated and a circle is drawn at that position (multiple circles actually, in order to also draw the outline of the text). Then that is saved to a texture, to be used to draw it on the wall and as "base" image for the next graffiti frame. The texture is cleared while the camera is transitioning from the previous to the next graffiti spots.

Index

WIP content #

first prototype of the railway tunnel, with simple lighting
first prototype of the railway tunnel, with simple lighting

using a slider to control which lighting system to use
messing around with the marched lighting


Artifacts when using the Java AWT ScrollPane in the tool.


Artifacts when using the Java Swing JScrollPane in the tool.


Using the trackbars to control the camera. Initial support beam.


Using mouse+keyboard to control the camera. Early version of support beams.

Index