[ZAFI]
Crooli Newsroom
From Crooli21 October 2026·8 min read

Portal 2D: 53 Chambers, All Solved Before You Arrive

SourcePublished by Crooli and presented in ZAFI’s reading experience.

A pixel-art portal puzzler that runs in your browser. See-through portals, lasers, a map builder, and a bot that plays every level before you do.

Crooli NewsroomCompany news and product updates
View original

A pixel-art puzzler where the portals are real, the physics is honest, and a bot has already beaten every level.

![The Portal 2D title card: pixel-art lettering, a blue and an orange portal line, and a small terracotta test subject standing in front of two glass panes](/blog/portal2d/banner.png)

*Welcome, test subject. Please keep your hands, feet and momentum inside the portals at all times.*

Portal 2D is a side-scrolling puzzle game about two holes in the wall. Fire one blue, fire one orange, and anything that goes into one comes out of the other. That is the whole idea, and it turns out to be enough for fifty-three test chambers.

It is also a Labs experiment that got out of hand. Every sprite, every tile, the lettering and every sound effect is generated by code. It runs in your browser, so there is nothing to download, it is free, and the code lives on GitHub. Play it here.

Chamber 01: Fling

The first thing to learn is that portals keep your speed. Fall into one and you come out of the other at the same speed, in whatever direction that portal faces. Drop from higher and you leave faster. Put the exit on a floor and you are thrown back up.

*This part of the story is interactive. See it on crooli.com.*

That little sandbox runs the same rule the game does. A portal sits on a wall, a floor or a ceiling and has an outward direction. Going from portal A to portal B turns A's direction into the opposite of B's, and position and velocity both go through that one turn. Try the ceiling: the turn is nothing at all, so you simply keep falling, faster and faster. Try a wall and you are fired sideways.

![Gameplay of chamber 6, Speedy Thing: the test subject uses portals to be flung across a room](/blog/portal2d/fling.gif)

*Chamber 6, Speedy Thing, in the real game. The momentum comes through the portal with the subject.*

In the game, that one rule also carries lasers, decides which tiles stop being solid as you sink in, and drives the picture of the room behind each portal.

Chamber 02: Look through it

In most games a portal is a sticker. Here it is a window. Once both are open, each one swells into an oval lens that shows the room in front of its partner, squeezed through a fish-eye curve, shifted a little as you move so it has real depth, with ripples, a swirl and a dithered, sparkling rim.

![Gameplay of chamber 1, Awakening: a blue and an orange portal, each showing a view of the other side](/blog/portal2d/lens.gif)

*Chamber 1, Awakening. Each lens shows a live view out of its partner.*

Under the shine is a simple trick. The world is drawn a second time, through the portal's transform, into an off-screen picture. The lens is a shader that samples it. Characters passing through are redrawn on the room side, so they never vanish behind the glass.

Chamber 03: Light, bent

Lasers travel through portals too. A beam that hits a portal face carries on out of the other one, so the puzzle becomes working out where to put the doorways so the light ends up in the receiver. Mirror cubes, glass and ceiling lasers add more ways to bend it.

![Gameplay of chamber 9, Relay: a red laser beam in a long room with a portal on the floor](/blog/portal2d/laser.gif)

*Chamber 9, Relay. Lasers go through portals, so you can redirect them into receivers.*

The rest of the chamber toolbox is just as small and just as combinable: weighted cubes and buttons, toxic goo, emancipation grids, blue repulsion gel, orange launch plates, orange speed gel and timed buttons. A new idea turns up every few chambers, and then the later chambers combine them.

![Chamber 13, Two Weights: a long room with a cube on a button, a blue portal on the floor and a green exit](/blog/portal2d/l13.png)

*Chamber 13, Two Weights. The first forty chambers are handcrafted, each with its own trick: shooting portals through a window, using a cube as a step stool, a sealed cell, a speed loop, a level with no portal gun at all.*

Chamber 04: The one that never ends

Random Test serves an endless run of chambers. Every run gets harder, harder rooms only unlock as your streak grows, and the game remembers your best.

![Random Test mode, streak 1: a generated chamber with two laser beams and a doorway](/blog/portal2d/random.gif)

*Random Test, streak 1. This chamber was made a moment before it was played.*

Randomly generated puzzles have a classic problem: some of them cannot be solved. Portal 2D does not hand you one until it is sure. A bot drives the real physics with scripted inputs. Every handcrafted chamber has a reference solution, and a test script replays all of them through the game's physics with no window. In Random Test, each type of room writes out the inputs that solve it, and a chamber only gets near you after the bot has finished it. The browser version draws from a large pool of chambers that were verified ahead of time.

So when you are stuck, you are stuck on a puzzle with an answer.

Chamber 05: Build your own

A point-and-click map builder lets you design chambers of your own. Paint walls, glass, goo, gels, lasers, cubes, buttons and doors. Wire doors to buttons and targets by colour and number, and the editor draws the link lines and warns you about doors nobody can open. Undo, redo, resize, pick the portal gun you allow, then test play.

![The chamber select screen: a grid of numbered chambers with best times](/blog/portal2d/select.png)

*Chamber select. Beat one to unlock the next.*

Maps save in your browser, and you can download them all as one file as a backup. To share one, beat it first, so everything shared is known to be finishable, then press Share to copy a link. Your friend opens it and the map lands straight in their list. There is also a Featured Maps screen with hand-picked chambers, six to start, hosted on the game's GitHub page.

If you would rather play with one hand on the mouse, an option makes left click fire blue, then orange, then blue again.

Made in six days

Portal 2D went from nothing to version 2.9 in six days. The first four days were a desktop game in C#. Then it moved to the browser, which is now the main version. Drag along the line to watch the chamber count climb and the mechanics arrive.

*This part of the story is interactive. See it on crooli.com.*

Pixel art out of nothing

The game ships no art and no audio files. Tiles and sprites are painted pixel by pixel into buffers in code, the lettering is a bitmap font built by hand, and every sound effect is synthesised. The picture is drawn on a 640 by 360 canvas of 16-pixel tiles, then scaled up by a whole number with no smoothing, which is why it stays crisp. Fullscreen fills the screen, and a window gets the biggest whole-number size that fits. Each level's walls are baked with outlines, rounded corners, panel seams and a painted chamber number.

![The game's sprites: the test subject in eight frames, a cube with a heart, blue and orange portals, lettering and an exit door](/blog/portal2d/sprites.png)

*Everything on this sheet is drawn by code.*

The test subject in the sandbox above is the first frame from that sheet.

Your turn

Open it on a computer, because it wants a keyboard and a mouse. These are the controls:

*This part of the story is interactive. See it on crooli.com.*

Then take it for a spin. It is free for any non-commercial use, and your progress, your maps and your character are saved in the browser. There is a character customiser in Options, with hats, colours and a cape.

*This part of the story is interactive. See it on crooli.com.*

![Chamber complete: the results screen with the time and deaths for a finished chamber](/blog/portal2d/complete.png)

*Chamber complete. Your best time is kept for next time.*

The fine print

Portal 2D is plain JavaScript on a canvas, with no build step and no dependencies. The code is at github.com/xandertaylorx/portal-2d-game, and the README explains how it works. The original C# desktop version is frozen in the repo, and its builds are still on the releases page but get no more updates. Map codes are the same in both.

It is released under the PolyForm Strict License: you can download, play and study it for any non-commercial purpose, but you cannot sell it, modify it or redistribute the code or builds without permission. Portal 2D is an independent fan project. It is not affiliated with or endorsed by Valve Corporation, and Portal is a trademark of Valve Corporation.

Portal 2D lives in [Labs](/labs), with the rest of our experiments. Press R to restart a chamber, as often as you need to.

Labs