GERLA.CC

← Devlog

· Game Boy Advance

The September surprise: a new machine, and VECTOR

In July I wrote that something big was cooking and that I wasn't saying on which machine. Here it is: the Game Boy Advance. And not empty-handed, because a game came out of it along the way: VECTOR, a tribute to Portal, written from scratch for that hardware.

VECTOR, cover illustration

The cover illustration. It is not a screenshot: the GBA has sixteen colours per palette and 240×160 pixels, and the real screens are below.

The VECTOR chambers built so far

The rooms built so far, all together. Each teaches a single thing and asks for it once: walking and jumping, the portals, the cube on the plate, the turret, the beam, the moving machines.

Let's say it up front: it's a demo. The rooms built so far were there to get me on speaking terms with the processor and see what came out: they're a beginning, not a finish line, and more are coming. It isn't a finished game and doesn't pretend to be one. But it runs, it plays, and the cartridge fits in a hundred and six thousand bytes.

The idea is Portal's, and nothing else: the gun doesn't fire bullets but portals, two of them, one warm and one cold, and they only stick to the pale panels. Go in one, come out of the other, and keep your speed: fall from high up into a portal and you come out of the other one fast. Nothing from the original was used, no art and no sound: the tribute is declared inside the game, on the INFO page, with the name of the original and of who made it, because a tribute that doesn't name the original isn't a tribute.

VECTOR, the laser beam VECTOR, the platform and the lift

The beam kills, stops at the first obstacle, and can be plugged with the cube. The lift has no buttons: it rises while you stand on it and comes down when you step off.

The machine. After the 8-bit 6502 and the 16-bit 68000, down here there's a 32-bit ARM at 16.8 MHz, and for the first time raw power isn't the main constraint. The constraint is elsewhere: 240 by 160 pixels, sixteen colours per palette, and above all how many colours you can fit inside an eight-by-eight tile. The craft is all in there. And the processor can't divide, so every cycle and every ramp is a power of two: not an affectation, but the fact that an arbitrary division becomes a call into a library that isn't here, and the program stops linking.

No bitmaps, as always. The graphics aren't drawn in a paint program: they're generated. Thirty-two JavaScript tools produce tiles, palettes, maps and tables as C files, and the rooms live in a text file with an editor that shows them drawn while you edit and recompiles the cartridge on save. The character too is generated part by part, and the walk poses come from a curve instead of numbers set by eye.

The two most instructive walls are told in full, because that's the part that really counts: the light that cast a shadow, that is how this machine blends colours and why a brown cone darkens the wall instead of lighting it; and it compiles, it runs, it doesn't work, five faults that raise no error at all, starting with a variable that lived in ROM and never changed.

The ROM for this build was 0.25.0, and it ran on emulators and on real hardware with a flashcart.

Update: the game has moved on quite a bit since, and what you download is always the latest build. Twelve rooms and a scrolling camera arrived, and then the rebuilt walk. This piece stays as it was, because it's the account of that day.

The game page

All of the devlog