---
# System prepended metadata

title: 'Assembly Mechs: Beyond WasmDome'
tags: [demos]

---

---
tags: demos
---
# Assembly Mechs: Beyond WasmDome

_The year is 2020 and our containerized civilization is falling apart. A cruel and villainous DevOps demon named **Boylur Plait** has descended from the cloud to Earth to challenge mankind to a tournament_. 

To win this tournament, _Assembly Mechs_ must compete in an absurdly over-dramatized contest. These mechs will challenge their creator's ability to write code that will outlast and defeat everything that the demon and its nearly infinite hordes pit against us. Humanity's only hope is to master a technology called **WebAssembly**, win the tournament, and prove to the cloud nemesis that this world is well protected.

## Overview

In this game, players will create Assembly Mechs to compete for supremacy in the WasmDome. Developers create a new mech by building a Rust **waSCC** actor, signing their module, and uploading it to the **WasmDome**. 

Will your mech survive? Is your code good enough to stand against the most vicious enemies the cloud can muster? Upload your mech to the WasmDome and find out, watching it participate in match after match as it collaborates with other mechs to fight for humanity's survival. Will your efforts be enough to save the world? _Not likely_, but it'll be fun trying!

Features:
* Build, sign, and test your **Assembly Mechs** in a local _WasmDome_
* Upload your mechs to the live, online WasmDome when you're ready for the action to begin!
* Watch matches start up live and review them turn-by-turn afterward to learn and improve your mech's code
* Check leaderboards and upcoming matches to see the best Assembly Mechs in action
* Learn how easy it is to build [waSCC actors](https://github.com/wascc) as you play the game

## Game Rules

The game is turn based, where each mech in a given match is given an opportunity to act per turn. These turns are time-agnostic, so they can be `100ms` for humans to watch or they can be run without any delay, allowing you to test an entire match in a matter of seconds.

All mechs (players and NPCs) are placed into the dome on a given map, which may or may not contain impassible obstacles such as walls and barriers.

At the beginning of a turn, the mechs are delivered an _event_ indicating a new turn has started. The mech can then respond with an _action list_ describing what they would like to perform during that turn. The total APs of this action list cannot exceed the mech's current _power_. If it does, the mech will be _stunned_ for that turn and perform none of the listed actions. There may be in-game effects that can temporarily reduce mech power or weapon range.

At the end of each turn, all mech actions are performed and resolved. After these actions take place, if any mech's `hull_integrity` reaches zero, that mech will take no further action for the rest of the match.

### Winning the Game

The winner of a match is the mech with the highest remaining `hull_integrity` after a set number of turns have passed. If only a single mech remains operable before the maximum turns have passed, that mech will win and the match will end early.

### Possible Mech Actions

The following is a list of actions a mech can take by using the appropriate methods in the _Assembly Mech SDK_:


| Action | AP Cost | Description |
| -------- | -------- | -------- |
| `move`     | 1     | Moves the mech one grid unit in a given direction.|
| `fire_primary`| 2 | Fires the mech's primary weapon in a given direction. Primary weapons fire a single small projectile that will damage the first thing it encounters. Primary weapon range is available via sensor interrogation. |
| `fire_secondary`| 4 | Fires the mech's secondary weapon in a given direction. Secondary weapons fire an explosive projectile that damages the first thing it encounters, as well as producing splash damage that radiates out from the point of impact. Secondary weapon range is available via sensor interrogation.  |
| `radar_scan` | 1 | Performs a full radar scan of the mech's surroundings, reporting on detected enemies and obstacles. The mech will receive the results of the scan at the beginning of the next turn.|

The default, unaffected power of a mech is **4** units, meaning that within a single turn a mech may fire its secondary weapon once, move 4 times, or perform some other combination of actions.
 
### Sensors

The following is a list of sensors a mech can interrogate during the course of a turn without incurring an action point cost:


| Sensor | Description | 
| -------- | -------- |
| `position`     | Indicates the mech's position within the dome     | 
| `hull_integrity` | An indicator of the current physical health of the mech's external body armor. If this reaches 0, the mech is rendered inoperable.|
| `power` | A measure of the mech's power. Indicates the _action point_ budget this mech has per turn.|
| `primary_range` | Indicates the distance in grid units a primary weapon projectile will travel if left unobstructed. |
| `secondary_range` | Indicates the distance in grid units a secondary weapon projectile will travel if left unobstructed. |

## Components

The following is a list of the _logical_ components that make up the entire WasmDome project. It does not necessarily map 1:1 to units of deployment.

| Component | Type | Description |
| -------- | -------- | -------- |
| `gantry` | Actors | Manages a secure repository of waSCC actors |
| `historian`     | Actor     | Reads events from an event stream, applies them to state, and persists the state and event history. Can be queried to "replay" events onto a messaging topic |
| `mech-host` | wasCC Host | A runtime host responsible for responding to "auctions" for actor scheduling. Listens to appropriate messages (e.g. `TakeTurn`) and delivers them to the right actor/mech |
| `match-coord` | Actor | The match coordinator. Responsible for triggering the scheduling auction at the start of matches, dispatching `TakeTurn` commands, and detecting a match's end state |
| `cmd-processor` | Actor | Command processor. Converts commands issued by actors during a turn into events and emits them on the appropriate event subject for processing |
| `leaderboard` | Actor | Owns the maintenance of victory and loss counts per player mech, scores, etc. Does not maintain scores for NPCs|
| `wasmdome-web` | Website | Front-end through which players interact with WasmDome, including logging in/registration, leaderboard viewing, submission of mechs, viewing of match logs, and input into match scheduling |
| `wasmdome-sdk` | Actor SDK | The SDK/API interface through which player-developed mech code will interact with the WasmDome |

# Cast of Characters

You will meet some interesting characters as you create mechs to take on the likes of **Boylur Plait**.

## NPCs (Your Opponents)

The following is a list of the non-player characters your mechs might tangle with on the game board.

| Avatar | NPC | Description |
| -------- | -------- | -------- |
| ![](https://i.imgur.com/pzg6vRN.png)     | Boylur Plait     | A demon descended from the cloud, bent on reducing your productivity through excessive typing, copying, and pasting     |
| ![](https://i.imgur.com/K9EA68s.png) | Kode Friez | Just when you thought you were on a roll - look out! |
| ![](https://i.imgur.com/MBwZYwc.png) | Sir Emony | Why simply get something done when you can spend 10x the time on the surrounding process? |
| ![](https://i.imgur.com/CzvQXwR.png) | Deeploy Jenkinns | Your worst nightmare - unpredictable deployment! |


## Player Avatars

The following is a list of player-selectable avatars. Simply add the tag `avatar-{name}` to your signed actor and the game will automatically assign you the right image. For example, to pick the first avatar, you would add the tag `avatar-bot-1` to your module.

| Avatar | Name | 
| -------- | -------- |
|![](https://i.imgur.com/8CBVqwy.png)| `bot-1` |
|![](https://i.imgur.com/apkAaPz.png)| `bot-2`|
|![](https://i.imgur.com/RpMHxGl.png) |`bot-3` |
|![](https://i.imgur.com/LgPsO0z.png) | `bot-4`|
|![](https://i.imgur.com/psFddBe.png)| `bot-5`|
|![](https://i.imgur.com/n1LpDS7.png) | `bot-6`|
|![](https://i.imgur.com/OSckjvH.png)| `bot-7` |
|![](https://i.imgur.com/ckcuVqW.png)| `bot-8` |

## Turrets

The following are the icons you may see on the game board for turrets. Turrets are _not_ aligned with players, and are on the side of Boylur Plait and his henchmen.

![](https://i.imgur.com/Lc1VAr5.png)
![](https://i.imgur.com/TjcSxD2.png)
![](https://i.imgur.com/6Kmap31.png)
![](https://i.imgur.com/OIWIt6H.png)


