This guide walks you through everything you need to go from a blank terminal to a running Constellations simulation. By the end you will have the Arcade window open, a star graph rendered on screen, and a donkey ready to traverse it using either Dijkstra’s shortest-path or DFS longest-path algorithm.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tutosrive/Constellations/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install dependencies
Install the single required package using pip:The Arcade 3.3.3 bundles everything needed for window management, sprite rendering, and the game loop. No other third-party packages are required.
requirements.txt file contains exactly one entry:Verifying the Launch
A successful launch opens an 800 × 620 pixel resizable window titled “Spatial Donkey - Graphs”, centred on your primary display. The opening screen is theMenuView, which contains:
- A “Cargar JSON” button at the top for loading a custom constellation file.
- Two text input boxes labelled “Inicio” (start star) and “Fin” (end star), where you type the letter labels of your chosen stars (e.g.
A,G). - A “Ruta más corta” button that runs Dijkstra’s algorithm and animates the shortest path.
- A “Ruta más larga” button that runs the DFS longest-path search with donkey resource constraints.
Your First Graph
Constellations reads its star graph from a JSON file. The default graph ships atsrc/data/Constellations.json, but you can craft your own. Below is the minimal structure for a three-star constellation — the simplest graph you can load:
Top-Level Field Reference
| Field | Type | Description |
|---|---|---|
constellations | array | One or more named groups of stars. Stars across different constellations can still be linked by starId. |
burroenergiaInicial | number | The donkey’s starting energy level (0–100). Each edge traversal consumes distance × 0.1 energy. |
estadoSalud | string | Initial health label — "Excellent" (100%), "Good" (75%), "Bad" (50%), or "Dying" (25%). Each edge traversal also reduces health by distance × 0.05; visiting a hypergiant star restores +10 health. |
pasto | number | Starting grass supply in kg. Each edge traversal consumes distance × 0.02 kg; eating at a star consumes timeToEat kg. |
startAge | number | The donkey’s age at the beginning of the simulation. Modified by each star’s ageImpact during research. |
deathAge | number | The maximum age the donkey can reach before dying of old age. |