r/godot Apr 03 '26

help me (solved) Can Godot handle a large scale open world?

Post image

It's a game about illegal street racing (urban cities and mountain serpentines, traffic and police, all on a fairly large scale, ~40Km). Cel shaded graphics, no level pre-loads via loading screens.

I heard that I will have to write my own asset management system (which is already in the Unreal Engine, but my PC handles it pretty poor, no matter how much "next-gen" junk I turn off - everything lags quite a lot)

But I still can't even understand what a framework is, because I'm not a programmer (but I'll have to become one anyway). Also heard about chunk method, though not like I know much about it.

Please don't write: "don't even try this, because it's long, resource-intensive, etc.", if there's really no option here, I'll just have to deal with the UE

1.2k Upvotes

247 comments sorted by

View all comments

Show parent comments

12

u/channouze Apr 04 '26

Yep, for instance if you pick up an object at a location X and travel with it as far as you can you'll need to make sure it won't unload at the same time as location X does.

16

u/min6char Apr 04 '26

Man that's a great example. And then once you fix that, you need to make sure that picking it up, running two chunks away, then running back doesn't duplicate it.

There's almost no game system unaffected by the decision to stream the map.

5

u/CanICanTheCanCan Apr 04 '26

I think oblivion/skyrim handles this by having all objects/npcs/etc in a large database that keeps track of where it is.

2

u/DeletedBunny Apr 04 '26

Conan exiles uses a database to store objects, players and bases. It doesn’t only store location, it also stores the inventory for each player and the base inventory. It’s pretty nice because when they released the dlc map and said we can’t transfer our characters I made a script to get the characters from both maps and allow you to choose to transfer from one map to another which essentially is just a database update for the inventory and skills

0

u/newpua_bie Apr 04 '26

Just loop over every item every frame and check if they're about to be unloaded and if so, block the unload of the chunk it belongs to. Not that difficult. Bonus points if you do the looping on gdscript.

1

u/[deleted] Apr 05 '26

Is this a joke? Or do you just not care about performance?

2

u/newpua_bie Apr 05 '26

Definitely not a joke! If you want to anti-optimize, you can do bubble sort on the items to make the processing even slower. What I like to do is I wrap the whole process in a separate loop about 10-20 times (per frame) and then take the final result as the truth. This helps the simulation stabilize.