Skip to content

Conversation

@08Solly
Copy link

@08Solly 08Solly commented Jul 24, 2025

🧾 Summary
This PR adds user interface support for visualizing and interacting with custom race tracks defined via a CSV file. The UI now renders the pre-defined obstacle layout row-by-row if such a file exists and is valid. This aligns with the engine's new feature that loads track layouts from custom_map.csv.

✨ Features Added
UI integration with new track system driven by CSV map.

Rendering of static obstacle patterns as defined by the engine.

Visual synchronization with repeated obstacle rows.

Proper fallback behavior when no CSV is available or when disabled.

⚙️ Implementation Details
The UI fetches the current track state from the engine as usual.

No changes to the communication protocol were needed – the backend exposes the map via the standard state() interface.

The UI interprets each {"name", "x", "y"} obstacle item and renders it accordingly.

No new dependencies were introduced.

📚 Motivation
This PR aligns the front-end with the engine's new custom track feature, ensuring users can see and interact with designed obstacle layouts, such as puzzle maps, symmetric challenges, or timed hazards.

🧪 Test Plan
Verified custom map loads and renders properly in UI when CSV exists.

Verified fallback to random map when file is missing or marked as disabled.

Validated correct positioning of obstacles across all lanes.

Ensured visual consistency on repeated loops (when map restarts).

🧩 Future Improvements
UI editor to allow drag-and-drop design of new CSV tracks.

In-game indicator for whether a custom map is active.

Highlighting differences between symmetric and asymmetric tracks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants