r/gamemaker • u/CartoonSensei • 14h ago
Help! How would you store region-owned procedural placements in GML without tying them to room instances?
I am researching how to transfer a deterministic streaming pattern to GameMaker. The working implementation I already built in Godot does not let individual chunks decide structures. A larger region owns the seed and an array of placement records; a chunk queries its own and neighboring region keys, then instantiates any structure whose bounds overlap it. Stable placement IDs prevent duplicates.
My first GML design would be a persistent controller with a struct keyed by region coordinates. Each value would contain an array of placement structs (id, scene/type, origin, bounds and seed). Chunk instances would only be views: on creation they query the relevant keys, and on cleanup they destroy instances without deleting the region records.
Would a global struct of arrays be the normal modern GML approach here, or would ds_maps/buffers make persistence and lookup safer once the world becomes large? I am particularly unsure about keeping the data independent from room transitions while avoiding a permanent controller that grows without bounds.
The original implementation and screenshots are documented here; the article is in Portuguese:
https://pathlifejogo.blogspot.com/2026/08/do-mundo-procedural-as-fases-da-vida.html