home

The control panel

Welcome. In general, objects on the map can be clicked for current information. Be aware that information displayed in the hud is outdated as soon as you click it. You will have to work with events and callbacks to react on certain things.
Your objective is to regain the former glory of the family business. To do so, collect resources to build more ships.

After manipulating your code, press the button in order to run it. But be careful: Many methods are asynchronous and code might still be running from the last execution!

TIP: use the global function `logger` for shallow logging into the output console.

About events

You can register a callback function using the .on-method every entity has. Be aware that only one callback can be registered at a time. This means that

starShips[0].on("arrived", ship => logger('I am here'));
starShips[0].on("arrived", ship => logger('And now a second time'));

will only fire "And now a second time" as the first callback is overwritten. Place your callback functions accordingly!

Exposed Variables

Variable
Description

starShips

Array of available starShips (you are starting with one)

spaceStation

Your uncle's station. This is where cargo gets unloaded, fuel refined and ships built.

planets

Array of available planets. This is where you mine resources.