GERLA.CC

game boy advance · demo · v0.44.0

VECTOR

A tribute to Portal for the Game Boy Advance, built from scratch. 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 and you come out fast. Twelve rooms in two halves, and the second is the same facility years later.

293 KB · runs on emulators and on real hardware with a flashcart · free demo

VECTOR, cover illustration

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

What it is

It's a demo, and I want that said before anything else: the rooms built so far were what it took to get on speaking terms with this machine's processor and see what came out. It isn't a finished game and doesn't pretend to be one: the rooms will grow, the ones here now are the beginning.

It's not a port and it uses nothing from the original: it's the same idea, two linked portals and speed carried through them intact, brought inside the constraints of a machine from 2001. Two hundred and forty pixels by a hundred and sixty, sixteen colours per palette, and everything you see drawn point by point: the walls, the steam from the air vents, the cones of light from the lamps, the neon tubes around the doorways.

no bitmaps. just code

The rooms

Each one teaches a single thing, and asks for it once. Then it opens onto the next. The game is split in two halves, and the second one is the same place, years later. These are the rooms built so far: more are coming, and the count isn't the point.

The portal chamber, in the working facility
first half · the plant

Everything still works here

The doors open, the water runs, the machines wait for orders. Six rooms to learn the rules: walking, the portals, the cube on the button, the turret, the beam, the machines.

The tower in the second half, with ivy and the waterfall
second half · the ruin

The same place, years later

Collapsed walls, moss and vines over the concrete, daylight through the holes. You recognise it, and that's the point: it isn't a new world, it's the earlier one left to go.

In the second half there are three things that don't exist in the first.

THE TOWER, two screens tall

THE TOWER, the last room: 30 blocks by 20, the first in the game taller than the screen. A drain at the top pours a waterfall crossing both floors, and for most of the room it's the only thing visible from both.

The camera's survey pan at the entrance of a chamber

every room is two screens wide, so walking in leaves half of it behind you. Before handing you the controls the camera goes to see the far end and comes back: barely two seconds, and it doesn't replay when you die.

The controls

The game's text is in English, and these are the buttons.

How it's built

No standard library and no engine: the game writes straight into the machine's registers. memset is hand-written, three lines, because the compiler needs it and the library isn't there. And the processor can't divide, so every cycle, every cadence and every ramp is a power of two or a counter that wraps: a division by an arbitrary number would become a call into a library that doesn't exist, and the program would stop linking.

The graphics aren't drawn in a paint program: they're generated. A set of JavaScript tools produces the tiles, palettes, maps and tables as C files, which are then compiled into the cartridge. The rooms live in a text file, and there's an editor that shows them drawn with the real game pieces, with the light cones, the beam runs, the lift travel and the jump arc, and that rebuilds the cartridge on save.

The sixteen frames of the VECTOR character

the character's sixteen frames: eight of walk, three of jump, five of aim. The walk poses aren't drawn by hand, they come from a curve.

Behind the scenes

Two of the walls I hit getting here, told in full: what was happening, why it was happening, and the code that fixed it.

The tribute, and what it isn't

VECTOR is a tribute to Portal, by Valve. The tribute is declared inside the game itself, on the INFO page, with the name of the original and of who made it: a tribute that doesn't name the original isn't a tribute.

From Portal it takes the idea: two linked portals, speed preserved, rooms that teach one thing at a time. It takes nothing material: no art, no sound, no music, no text, no characters, no names. It isn't called Portal, it doesn't use the trademark, it doesn't use the characters and it doesn't claim any connection to Valve.

Portal and Valve are trademarks of their respective owners. Game Boy Advance is a Nintendo trademark: VECTOR is an independent program for that machine, it contains no Nintendo code and is neither approved nor sponsored by Nintendo.

vector_v0.44.0.gba

293 KB · demo, v0.44.0 · emulator or flashcart
sha256 b41c97dc 66dbf9f5 1685e8f8 bc3cd5f7 e2273f33 e68a5c0b 50c01c54 be26e6f3

Download