Skip to content

five-on-it / packages/sim/src/escape

packages/sim/src/escape ​

The robbers' escape kit (GAME_DESIGN §12, "Escape kit & chaos"): items used from the inventory with the use key, each sold at the city's shops.

  • The grappling hook (HOOK): aimed at a wall, it catches the edge of the roof or the ledge on top of it within HOOK.range metres (hookAnchor), and the line pulls its user up the wall and over the edge onto the roof in about a second (hookStep: up to a point just off the wall over the edge, then onto the roof, with no gravity on the way). Each use spends a charge of the item. The line is the tell: the server sends a grapple event, which every client draws.
  • The paraglider (GLIDER): opened while falling or at a roof's edge, it carries its user forward at GLIDER.speed sinking at GLIDER.sink until it lands (glideStep); the movement keys turn it toward where they point. A landing under it never hurts. One use; bought again.
  • The cash cannon (RAIN): it throws RAIN.dollars of its user's Cash into the street as bundles to pick up (makeItRain), a rain event the crowd answers (@foi/ai's crowd rushes to grab it).
  • A crew contract (a getaway driver, a gunner, a hacker): used, it calls the hire in (a hire event, which @foi/ai's hired crew answers with an NPC at the user's side).

The hook and the glide are states of the character (Character.hook, Character.glide, hashed), moved by the character system the same on the server and in a client's prediction: the snapshots carry them as the hook and glide acts, and a client's twin takes them (adoptEscape): it glides as the server's does, and hangs on the line where the snapshots put it.

Type Aliases ​

Variables ​

Functions ​