My new WIP city generator

Recently I have been working on an infinite city generator that creates buildings on the fly, in Unity. was a pain in the &ss to get working but I have finally managed to finish it.
I plan to add this to s&box if I ever get a key / the game releases, using the new infinite maps feature, if it works.

just imagine this as a survival/darkrp map, that would be amazing.

The code I use shouldn’t be too hard to transfer either, as long as you can make custom meshes during runtime using source2.

can’t wait to play this game, man.
will update you all soon! :grin:
any thoughts?

6 Likes

This is actually really cool, if you could implement custom textures, it would be a great map/addon for a lot of gamemodes. Really cool that this can be done in s&box

thanks! custom textures is a thing I will definitely work on, although it might be hard to apply a texture to a single mesh. I might split up the buildings into multiple different meshes and then apply different textures to each them as a workaround

1 Like

This is really cool do you plan on open sourcing it?

Yes, although I might iron out a few bugs/ make code more readable first

This seems like a really good idea, @Shaman .
I hope it ends up open sourced.

I’ll attempt to contribute a little :slight_smile:

Looks awesome! reminds me of a really old alpha minecraft world i had lol!

Looks like a great start - add LOD generation, avoid the pop-in using fog and LOD, set up a buffer zone so people in vehicles driving fast won’t encounter issues…

If done right you can have this working so smoothly it will feel smooth.

Just make a profile if you haven’t already and I’m sure you’ll be nominated.

Thank you, will do. LOD is something i need to work on, I was thinking of using simple cubes with a texture on it until it loads in properly. Now that veichles are out I might need come up with a method to make sure that players cant just speed off the map before it loads in as well, yeah.

Well, you’ll want to bind the city to a seed - you also are not required to do everything in a single pass… If done right with the math, everything should be constant and not take a lot of work for the generation - the big thing will be the assets loading in and out. But with proper management, good buffer zones, LOD, and more - it will look good and be smooth.

1 Like