Endless world

Hey/ I need to make an endless generating world which has to follow the 3 rules:

  1. It is endless
  2. it shall to move. So a chunk spawns in front of the character, moves pass it and dissapears, making an illusion of moving forward (like a conveyer belt, for instance)
  3. the generaton has to follow some rules

How can I bring that to life?

What about making it on a sphere?

331114-sphere.gif

1 Like

I suppose the sphere will be too big for that. plus t can’t generate new random chunks. Basically, the game will be about watching a window in a train, so allthis is needed to make diffrent and interesting views. Have any Idea for that?

Basically, the game will be about
watching a window in a train

So the chunks would fly past like that?

Image from Gyazo

Yeah, but instead of meshes I thought I’d use the the landscapes. Have any Idea?

@ClockworkOcean

Is this your new thing after Zof?!

Yes, very early days :slight_smile:

I get sick of a) not being able to fill a terrain with nature, b) putting boundaries around the world. This is a possible answer…

331188-more.gif

1 Like

The above is randomised and using Instanced Static Meshes so it’s speedy. And yes, the idea would be to write algorithms that distribute elements randomly but also intelligently; you don’t want a forest in the middle of the river and no roads should intersect mountains.

However complex this is going to be, you’d need to work with layers of generation. Theme, ground, major features, minor features, details. Either generate content [procedurally from simple geometry][1] (or even procedural mesh) or have a vast library of ready-to-go assets and scatter them according to the some rules. Or, ideally, both - hand made, large, eye-catching elements & then procedural fillers like debris, small rocks, vegetation, etc. And work really hard on blending the edges.

So if you wanted a seamless bridge, you’d divide into min 3 bits and have a chunk manager actor control when to start the bridge, how many chunks have the middle bridge section and when the bridge ends.


Here’s the setup for the above (although this can be done in many ways and this may not be the best):

  • a chunk is an actor with an InterpToMovement component that moves the actor over 1500uus (750 to -750) over 5s and then resets

  • there are only 2 actors and the second chunk is delayed by 2.5s
  • you can have more, of course, it’d be a matter of setting an appropriate delay / interp distance

  • and the generation in this case:

  • create up to 25 Instanced Static Mesh Components
  • 5x5 sectors of 200uu each produces a square with a 1000uu side
  • each ISMC generates up to 25 instances of random mesh in its own sector, with randomised scale

This whole thing is a glorified grid and would work OK for a city or park (or an endless Flippy Bird orwhatshisname runner) where things are organised in a man-made fashion. For more organic stuff you’d need a very different algorithm.

Anyway, this is just an idea of how to potentially approach it. The actual generation would be an order of magnitude more complex but procedural generation is well covered.

I haven’t worked with landscapes much but afaik they’re static so this method is not too suitable. When you said chunks, I thought you meant procedural / semi-procedural generation.


Technically, nothing should stop you from moving the camera instead. Would streaming levels work for you?

well, I am afraid, that if I use level streaming, then it will still start to lag if you move far enough from the center of coordinates. But how can I make the system work with chunks and procedual generation? You’re actually helping me with this)

Not sure why it’d lag. You can always reset world origin if you worry about float precision. But it has nothing to do to with performance.


The original idea was for each chunk to generate the desired elements and slide the whole thing in front of the player’s camera. When no longer in camera frustum, the chunk is repositioned and regenerated. And the observer will never notice…

Image from Gyazo

From the player’s perspective:

Image from Gyazo

You’d need to iron out many kinks.

That looks fantastic. So the chunks are meshes, right? And they move from right to left. Is there a way to make them generate randomly? I mean make trees and roads and houses spawn in diffrent places, following certain rules. Procedual generation, basically

You’re rotating the sphere rather than moving the player, right? Looks wicked for early days!

AddLocationRotation

But you can update their transforms (and batching does not kill all the performance benefits of using (H)ISM. Even though the target here is ISM, it does work on HISMs.

Using it every frame, would kill it, though.


That looks great, mate. The radius makes be dizzy. This is not good for someone with vertigo. I feel like I must run forward or I’ll slide down to the back…

Also:

The actual generation would be an
order of magnitude more complex but
procedural generation is well covered.

And it seems you have the right person in the thread to pick their brain.

Yes, in fact there is no traditional player. You can still use WASD, but the planet rotates. Collsion was a bit of a ‘mare’, as everything is instanced.

I also got the little ‘Epic birthday present’ of discovering that AddLocationRotation doesn’t work for instances, and you can’t scale HISM without getting culling problems.

Yes, it has a bit of a ‘little prince’ feel…

I’m gonna try that transform node :slight_smile:

HA! - it works, wonder why they can’t get it right in the first place…

Thanks for help dude! That’s awesome!

Do you have a tutorial about how did you create this? It is awesome!

1 Like

The little planet?