Urgent.News

What's breaking now, across thousands of outlets.

Tech

Making a game on a custom bytecode VM in 7 days and 3kB

In the Langjam Gamejam, a 7-day challenge where participants create a programming language and use it to build a game, a shooter game was developed that fits within a 3kB Windows executable. The project combined interests in language tooling, game development, procedural graphics, and size constraints similar to those seen in the demoscene.

The game jam format forced the developer to keep the scope small and explore new ideas, resulting in a fun and rewarding experience. The developer's decision to create a custom bytecode VM and render graphics using a fullscreen pixel shader led to the creation of a compact, 3kB executable. The minimalist design of the custom bytecode uses only float arrays for communication with the shader, avoiding complex features like stacks, registers, and type tagging.

Syntactic sugar, such as support for assignments, if conditions, while loops, and inlining, was implemented to make the language more user-friendly. The game's design, though simple, is infinite, with enemies being added every 7 seconds and never dying, instead teleporting outside the screen. The game's graphics were kept simple, employing a feedback effect and noise functions to make the visuals more interesting.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at laurent.le-brun.eu →

More in Tech

More from Wednesday 12 August →