Entities
The galaxy map is filled with entities which are celestial objects defined by their x
& y
positions as well as a radius r
. There are two entity types today, Stars & Wormholes, but we'll focus on stars for now.

Discovery
Today, the main aim of the game is to discover new entities. Instead of just pushing them into the map in a few transactions, they've been generated offchain & players can discover them by exploring the map and requesting a central server's signature to add them to the map.
This is what it looks like:

A 10 milion px by 10 milion px map filled with 30k stars. As of writting 5070 stars have been discovered by players ! You can see the trail some of them are leaving. All of which is permanently onchain.

Star NFTs
All entities are also represented onchain by a ERC721 tokens that are all stored in the map contract for now. You can see the tokens being minted as they are added to the map in the game, in the OpenSea collection. OpenSea collection
Entity Vicinity
In order to create interactions. A zone around every entity is simply defined by half of the entity's radius. This zone is defined as the entity's vicinity. It can be checked onchain & used by any external contracts.

Hooks
Hooks are smart contracts that can be used on any entity and react to players moving in and out of their vicinity.
onMovingTo()
: Called when a player moves into the vicinity of the entity.onLeave()
: Called when a player moves out of the vicinity of the entity.- Hook contract can also call
isMoving()
getter in order to know if a player has arrive or is in transit to it.
