Render a procedurally generated world into a sprite or tilemap

the shape painter is itself unperformant, simply because of how its rendered

Even if it’s drawing once, and not removed between frames?

I need a minimap that could be constantly updated on each frame, so it will have to be performant. having hundreds of small objects might not work, and depends if shapepainter is performant or not…

What part of it needs updating every frame? Do those variables you mentioned in your first post change that frequently?

They change every frame as new tiles are being procedurally generated and old tiles farther away not in camera view are being deleted when you walk around.

That sounds more like you are adding to the minimap, not updating all pixels. With my suggestion of using the shape painter you’d draw on a new layer as the new terrain is generated. You use object masking to only show a small portion of the layer (like a small rectangle in the top right) and scroll the layer in the direction the player moves.

How would I delete the old area, or would it get larger and larger? For optimizations sakes. From what I gather, you would only be able to see what you have explored on the minimap?

My initial thought are to let it grow with the newly generated terrain.

Let me rustle up a sample project to see if it works. Because in theory it works perfectly :grin:. But @DesmonDev may be correct and it could run like a dog.

Thanks! So the newly generated terrain would be infinite… so would have to cull extra objects on the map.
P.S. A dog (e.g. Greyhound) runs pretty well.

youd have to change the coords of the boxes being painted so that it stays centered on the player, meaning youd still have to update it each frame, and im not sure if object masking works on entire layers

Object masking works on an object, not a layer.

Here’s a short clip of the mini-map PoC running:

minimap


Admittedly the mini-map is drawn once at the start, but it shouldn’t be onerous to add a small area as it gets generated. Here are the events for the gif above:

Thanks, man! I will try it out and see if it works!!


ok, progress, progress!!! Thanks so much! I’m finally getting somewhere!

I read your previous messages
And if you start to get lag
Then be aware you don’t need to render it each frame
Actually you should use different frames for rendering different stuff to avoid lag

I might only render the map when you open it, perhaps, like taking out a paper map to read.


Working on terrain representation on map.

hey…its something! ive always wondered what the worlda map actually looks like zoomed out.

Thats actually a fake representation of worlda’s world… still figuring out how to actually syncrhonize the minimap and the actual world. Right now it is just coloring a randomly generated perlin noise map, not actuall worldas one.

…oh! fair enough! ive had that problem too. but, you should probably be using the tilemap data, not the world generation data.

itd update dynamically yknow


Looking a bit better but still not really synced to the world.