Game Mechanics

Tiny Heist is a fast-paced stealth game where you play as an @ symbol (with arms and legs). Your mission is to climb a tower from the first floor up, collecting as many gems as you can along the way, without getting caught. The tower is composed of 15 floors (14 mazes and a bonus level), a tower base and a rooftop, where you can access the helipad to be rescued with your loot, if you make it.

The game was created by Terry Cavanagh was originally written on flash, but there is now a HTML5 version available.

Basics
The playing board is divided in small squares. Each square may be an empty space or contain a wall brick, the Player, a door, a gem, one collectible item or one enemy (guard or camera). No two objects can occupy the same space at the same time; if the player moves into an occupied square, the thing either disappears (doors opened, objects collected) or gets stunned (enemies). Keys and stunned enemies do not count as "occupying objects". Banana peels have their own rules (see "Spawning" below).

Enemies, in most cases, have a line of sight. If they are armed with lasers (red sight), and you enter their line of sight you will receive damage. If they are not - white sight - they will only detect you, but may raise the alarm informing others of your presence.

You begin with three lives and every enemy damage you take takes away a life. Using one first-aid kit adds one life. Your character color will change as it loses lives (from full yellow if 3 lives or more, to blinking yellow/white at two lives, and red if only one life left).

Controls

 * To Move: Use the Arrow keys or WASD keys.


 * To Wait: Press Z, Enter, or the Spacebar.


 * To Use Items: Press 1, 2, or 3 to use whatever is in the corresponding slot (can be seen in the bottom right corner).
 * To Restart: Press the R key.

Round mechanics
The game is turn based. Every turn you can receive a round, meaning you can make a valid move (walking anywhere, using an item or waiting) and then all enemies also receive a round to act.

Some enemies take two rounds to walk, for instance. In some situations an enemy may act twice per round. If you do nothing on the keyboard, the game is essentially paused.

The order of rounds in a turn (as tested by gameplay), after the player makes their valid move, is:
 * If you entered the exit, the level ends;
 * If you used an item, it acts;
 * If you stepped over the entrance, its countdown pauses;
 * If you moved to a square where an enemy was, it gets stunned and loses its round;
 * All stunned enemies count one less round of waiting to wake up;
 * If any stunned enemy's countdown is zeroed, it wakes up;
 * All cameras move their sight by one tile;
 * All cameras actively look for the player;
 * All moving guards check / decide their trajectory, and if unimpeded, move;
 * All banana peels act;
 * All enemies attack the player if possible;
 * Any enemies susceptible to fire standing in it are killed;
 * If the entrance's countdown is zeroed, an enemy will raise from it.

One exception to this order is if you raise a bot's alarm by moving into its sight. The moment you come into a line of sight of a patrol bot, it will not move in the same round. However, if a bot moves, and then sees you, he will raise the alarm anyway (and may fire at you if able, of course).

This order is important to understand many advanced aspects of the game, and having it in mind may substantially increase your chances of winning.

It is important to notice that should the player make an invalid move (like walking towards a wall or trying to open a green door without a proper key) the game does not count the move, meaning that nothing happens (even though the @ makes a walking animation). This can be particularly useful if you are cornered against a bot and have a banana, because you can change your back to face the right direction without the enemy moving.

Enemy movement and alarms
There are basically two types of enemies: Guards and Cameras. Guards patrol the areas randomly in most cases, and if they detect you, pursue you by themselves; Cameras are stationary and patrol areas in moving sight. If they detect you they raise the alarm - informing all guards of your presence.

Some enemies (guards and cameras alike) have lasers, taking a life away every round you are in their range (marked with red squares). The laser bot is an exception: It will fire at you once, but then it will proceed to chase you (not firing again).

Other enemies have only detection (marked with white squares); cameras can warn guards of your presence, while bots and dogs will chase you upon detection. An chasing enemy will always take the straightest unimpeded path possible; if there are two options, it will usually prefer the one it is already facing.

The game's AI is actually fairly simple: if the alarm is raised, the bots will run the shortest path to reach you; if they are impeded, they will look for alternative paths (making them effectively surround you). If one small hallway is the only path possible, a single bot will chase you while others (having no other path) will wait in place.

Some enemies, once they see you, will run after you but won't alert other guards. Others, like Rooks, will harm you upon touch but otherwise keep their paths. Some specific enemies are aware of your presence and location. See the proper section for more details.

Stunned enemies don't mean anything to other bots, and will not make them aware of you.

No two "things" can occupy the same spot: if two enemies mean to move to the same square, one will change its path. Walls, doors, collectible items and the player are also "things" in this context, so an enemy cannot occupy the same square as you - if a guard is adjacent to you while unaware, it will simply choose another path to go. See the example below.

Cameras also act in predictable patterns. If you look at the order of things on each round you'll see that movements are processed before line-of-sights and alarms, making some "impossible" movements possible - like x-raying through camera's sights.

Stunning and killing
If you enter an enemy's space you stun it for some time. In regular mode, from the moment you stun the guard or camera, 32 rounds are needed for it to come back. When there are 9 rounds left, a countdown will start on their symbol. Anytime you occupy a square where there is a stunned enemy its countdown halts, until you leave - but if you move into it the exact moment it awakes, it will detect you, hurt you and/or raise the alarm. The order of rounds in the turn explains this as well.

If a guard detects you and gets stunned, it will forget of your presence. The same cannot be told for cameras: if the "master" alarm is raised, it will remain so until either you die, leave the floor or use a Cardboard box collectible. Even if you kill all enemies and cameras, enemies will spawn from the entrance alerted and at a faster rate.

Some weapons may completely kill an enemy, not allowing it to come back again. Dead enemies are marked with sparkles, instead of being grayed out in place.

Waking up is part of an enemy's turn. If it wakes up facing you it will attack you straight away. Being spawned from the entrance, however, is not (see below).

If the enemy's path is blocked by any object (like an enemy or a collectible) the AI tries to find an alternate path. Not finding it, it makes the tracking guards (bots) wait, while rooks and other "automated" enemies keep moving.

Stunned enemies do not count as objects. Sometimes stunning a single camera on a hallway may open the path to your enemies. That can create interesting situations.

Spawning
Every about 75 rounds a new enemy spawns at the entrance. The rounds where the entrance is occupied (by the player or enemies) do not count: If the player remains 10 rounds before moving out, the countdown pauses for 10 rounds. In this aspect the banana peel works as an object - if you leave one at the entrance no guards will spawn ever for that level. Leaving peels to stop the countdown does not work on enemies on the floor - they will awake to be stunned again only once and the peel disappears, working like a key (non-occupying object).

A guard is only spawn at the very end of the turn; therefore it may come up looking at the player, but it will not act until the next round. Contrary to believed in the comments, there is no known limit on the number of bots that can spawn; There is, however, a limited space on each level, and since space can contain no more than one enemy, eventually the entrance can be overcrowded and no more enemies could spawn.

The logic of spawning if the alarm is raised is still unknown, likely randomized. But it is certain they do spawn at more than double the rate and already alarmed.

Fire
When using a matchstick you can create a burst of fire in a level, which has its own mechanics. Each round in a fire takes one player's life, just like lasers. The fire begins with incomplete 7x7 squares (see below) It has no walls or door limitations and gradually fills its gaps and expands its radius every 15-25 turns, eventually consuming the entire floor. The fire can be put out practically only with a fire extinguisher, and then again only parts of it.

Enemies ignore the nature of fire and will keep moving and chasing you normally, much to their doom if you used the matchstick properly. Fire kills permanently any enemy or stunned enemy, except for those that are immune to fire, like Elite bots and Terminators. This happens at the end of the round - Enemies will move and attack you, if possible, before dying.

If fire is covering the entrance and an enemy emerges, the fire will not kill the enemy in the first round because enemy spawning is the last act in the round order - but it will kill him the very next round. For the same reason, even if the exit is on fire (like the picture below) you take no damage entering it.

The fire river on the tower base expands normally but does not go beyond its first screen.

By all means do not try this at home.

Hardmode
There is a secret level in the game, that once accessed, can get you in Hardmode - where many stats of the game change, but the mechanics remain the same. This level can also get you in glitch mode if you enter it with appropriate collectibles. In particular, you need to fight past the firemen and either drill or bomb your way past the outer wall.