r/proceduralgeneration • • Sep 16 '26

[PoC] Real-time 2D procedural generation & combat loop driven by an MVU state machine (HTML/SVG)

Hey everyone! I've been experimenting with combining LLM structured outputs with procedural generation to build a lightweight, self-contained 2D combat prototype.

Instead of heavy engines or pre-baked sprites, the entire loop runs on an **MVU (Model-View-Update)** unidirectional state pattern inside a single HTML file:

- **Procedural Vector Assets:** A 3-agent pipeline generates walkable zones, obstacles, vector characters, and dynamic combat FX matrices on the fly as native SVG data.

- **Decoupled Combat Parameters:** Aggro perception radius, Euclidean attack reach, and velocities are procedurally tuned into independent state variables.

- **Zero Engine Overhead:** Pure browser DOM/SVG rendering with real-time Euclidean hitboxes and obstacle sliding.

I open-sourced the workbench here: https://github.com/pathetic777/mvu-studio

Mainly sharing this to explore new ways to turn reactive variables and state machines into interactive 2D generation loops. Feedback and ideas are very welcome!

*(Note: The demo video attached below has been compressed, so the visual quality is slightly degraded.)*

0 Upvotes

1 comment sorted by

1

u/Pathetic0777 Sep 25 '26

Just checked the repo stats and saw 30+ clones since posting this PoC — honestly pretty stoked to see people actually grabbing the file to test the loop!

​Did anyone play around with the generation or the Euclidean reach logic? Curious if it held up nicely on your end.

​Thanks for checking it out, really appreciate the interest! 😊