Procedural or not

Good day all, gamedev rook here. I want to know what will be the best way for a beginner like me to go about this. I want to make a game where the character will always be moving in only one direction. So the map is one looooong straight map. So I either want to attempt a procedural world, creating mesh, terrain etc as you move forward, Or should I rather build the whole “road” ahead of the player (100km) and only make objects procedural? Hope this makes sense

A large hand crafted world is potentially more interesting and varied for the player but it takes ages to create and so it’s not very practical for a lone developer to attempt. Procedural worlds can be more interesting for the developer as it can get incredibly boring looking at the same hand crafted world all the time. Although over time a procedural world will eventually struggle to surprise the viewer and they’ll feel like they’ve seen it all before.

What I’ve found is that we can only distinguish between a small number of variations of something and so instead of spending a month creating a fancy procedure that can create a thousand different trees, it’s easier and quicker to just manually model ten different trees. Nobody will notice…

1 Like

Also, if your making a road that’s 100km you should be aware that you’ll start seeing vertex precision problems around 5-10km from the origin (assuming units=1m).

For such a large world you’ll either want to keep the player and camera in one place and move the world past them, or create a floating-origin system. In either case, procedurally generating small sections of the map at a time will probably work a lot better than having some huge, clunky world map all loaded at once.

2 Likes

To keep “long maps” interesting, split hem into some for of biomes.

Even if is procedural, each biom should be significantly different. Let’s say 10 boomers every 10km.
You can do also shift origin every 10km.

Another option is, to scale down world to 0.1 unit.
Then 10km becomes actually 100km.

May cost a bit of floating precision. But depends what doing, may be not noticeable.

Splitting world into chunks, can help maintaining sections of the map. So keep smaller. Tes smaller chunks at once. Easier to change and replace things.

Checkout Unrailed game, how they did it.
But minecraft is also good example of using biomes in procedurally generated world.

Limiting the range to 10km is good advice but scaling everything down to 0.1 would be redundant because the reduced scale will result in increasingly wobbly mesh vertices as objects approach the 10km limit. And if you’re okay with that degree of wobble then you may as well as just leave the world scale at 1 and set the limit to 100km.

I’ve heard more recent versions of Unity have made some changes to help a little with precision issues but I’ve not tested this myself.

Only within the rendering pipeline itself (and thinknonly hdrp).
To ensure that the transforms of your objects do not suffer from the imprecision remains the developers duty.

I’d say procedural is more fun to develop :wink:

A hybrid approach is also an option though. Handcrafted base design of the level with procedurally added details.
Think Subnautica went that route.
You will likely need some “chunking” though for the 100Km otherwise the scene becomes enormous.

Regardless of what you choose, I think it’s often best to flesh out the game (testing the game loop, mechanics, look/feel, pacing, etc) with a procedural system, since it can give you a lot of test variety and ideas for what to fix into the game world. Otherwise it’s easy to spend lots of initial development time working within a very limited scope of what the world will eventually become.