Elevator Saga

Most management games ask you to press a button. Elevator Saga asks you to write a program. You get a building with floors, a handful of elevators and an endless stream of little people who urgently need to be somewhere. There are no buttons — there is a JavaScript editor and two functions: init and update.

Gameplay screenshot: Elevator Saga

The task sounds deceptively simple

Transport 15 people. Then transport 20 within 60 seconds. Then keep the maximum wait under 10 seconds. Then finish with no more than N moves. There are 20 challenges, and every next one hits exactly the spot where your algorithm was only "roughly fine".

Challenge one falls to a three-line script: "go to the first pressed floor". Challenge five does not. It turns out the elevator reverses mid-travel because someone pressed a button behind it, that passengers refuse to board an elevator going the wrong way, and that three uncoordinated elevators perform worse than one sane one.

Why it is worth your time

It is a rare puzzle that honestly teaches two things: read the state of the system before acting, and don't optimize too early. You write the dumbest algorithm first, watch where it breaks, and only then add the condition. That is how working code gets written — usually nobody hands out points for it.

The game is fully bilingual: the interface, the challenge conditions and the documentation switch between Russian and English, so you can solve it in whichever language you think in.

Where to start

  • Open the first challenge and press Apply without touching the code. Watch how badly the elevators behave.
  • Add elevator.getPressedFloors() to update — that alone clears the early challenges.
  • When you hit the wait-time wall, open the "Documentation" tab: every method is listed there with examples, including the passing_floor and stopped_at_floor events.
  • Don't be afraid of Reset: the starter code of a challenge can always be restored.

Play Elevator Saga

INFO
[Partner ads]

We use cook​ies for analytics. Click "OK" to consent.

Details