By TxPipe

Gameplay

Building a ship

  • to create a ship, the participant has to mint a new ShipToken and matching PilotToken through a mint validator called ShipyardPolicy.
  • each Pilot / Ship token pair will be unique. The validator will ensure uniqueness by incrementing a "counter" datum locked in the AsteriaUtxo.
  • the asset name of the ShipToken and PilotToken will contain the counter value as a suffix. Eg: SHIP23 and PILOT23.
  • the ShipToken needs to be locked in the SpaceTimeScript and the PilotToken needs to go to an address controlled by the participant.
  • the mint process will require locking an ADA payment adding to the reward pot. The amount of this payment is defined by our constant SHIP_MINT_FEE.

Moving your ship

  • movement of a ship through the grid is achieved by a transaction the consumes the ShipState UTxO and outputs a new one with the updated state.
  • the maximum distance that can be achieved in a single transaction is constrained by the constant MAX_SHIP_MOVEMENT_PER_TX.
  • moving the ship will consume a quantity of fuel proportional to the distance. The ratio of fuel required per distance unit is defined by the constant FUEL_PER_DISTANCE_UNIT.

Gathering fuel

  • gathering fuel is achieved by a transaction that consumes the ShipUtxo and a PelletUtxo and outputs a new ShipUtxo with increased fuel value.
  • to consume a fuel pellet, the position of the ship must overlap with the position of the pellet.
  • the total amount of fuel that ship has can't exceed the MAX_SHIP_FUEL parameter.
  • if the fuel pellet isn't totally consumed, a new PelletUtxo needs to be generated with the remaining of the fuel and maintaining the same location in the grid.

Mining Asteria

  • this action is achieved by a transaction that consumes the ShipUtxo and AsteriaUtxo and outputs a new one that extracts assets from the AsteriaUtxo into a wallet defined by the participant.
  • the amount of assets that can be extracted from the AsteriaUtxo must not exceed a percentage of the total available defined by the MAX_ASTERIA_MINING.
  • to execute this action, the ShipUtxo must be present at coordinates (0, 0).