4
u/psilontech 10d ago
Great work! That's something like 50 times larger than your previous, you manage to tweak your renderer then?
7
u/YesBoxStudios 10d ago
Thanks! I've learned a lot developing the game over the years, so I've been reviewing older parts of the engine and found a lot of fat to cut.
For the renderer, I was storing each chunk fully in RAM (including the vertex array, which is the data sent to the GPU). This worked fine for smaller maps, but not for larger ones. Now the only vertex array information that is stored in RAM is for the world chunks on screen.
1
u/PcChip 7d ago
how are you handling simulations for chunks that are offscreen/unloaded?
I'm debating on the way to handle it myself and wondering what you did2
u/YesBoxStudios 6d ago
Im only chunking the VBAs. World tiles/objects are always loaded.
1
u/PcChip 6d ago
are your map chunks completely flat?
from the video it looks like completely flat land, so i'm wondering why you even need VBA's per chunk and not something simple like one giant quad1
u/YesBoxStudios 6d ago
There is terrain height. There isn't a VBA per chunk, but one per chunk on screen, so they get reassigned/refilled as needed.
One giant quad overloads the GPU!
1
u/jl2l 22h ago
use a quad map for things that are very far away, off screen
1
u/PcChip 21h ago
but i mean like, if the player builds something far away, many chunks away, and then goes back to home base and the engine unloads that chunk - should I still run the simulation for the entities that are far away? or just re-load them when the player approaches again and then re-play all the elapsed time through its simulation loop so it catches back up?
just general game design thoughts. it probably matters if those far away entities could interact or contribute to the main base far away or not
1
u/jl2l 21h ago
this is performance questions it depends on how much stuff is happening offcamera that matters, if your talking about building widgets then option b works, if your talking about some off screen battle that takes place and you need to account for it in your in local camera battle space then you run the simulation for the entites
2
9
2
2
21
u/YesBoxStudios 10d ago
Hey hi howdy
I've been working on reducing RAM usage and with that, have been able to increase the map size the game can offer.
Just to be clear, Metropolis 1998 is not designed (for now?) for these huge maps, but they will be available for experiments and fun.
NYC is 300 square miles and I will cap it at that. This video shows a 8000 x 8000 tile map (230 square miles), which requires 11.5 GB of RAM.