# Endless world

**URL:** <https://forums.unrealengine.com/t/endless-world/479530>\
**Category:** World Creation\
**Tags:** Procedural-Generation, unreal-engine, Landscape, question\
**Created:** [February 27, 2021, 6:28pm UTC](https://forums.unrealengine.com/t/endless-world/479530 "2021-02-27T18:28:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serg\_Karmach](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Serg\_Karmach](https://forums.unrealengine.com/u/Serg_Karmach)\
**Post date:** [February 27, 2021, 6:28pm UTC](https://forums.unrealengine.com/t/endless-world/479530/1 "2021-02-27T18:28:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [February 27, 2021, 8:41pm UTC](https://forums.unrealengine.com/t/endless-world/479530/2 "2021-02-27T20:41:46Z")

</div>

What about making it on a sphere?

![331114-sphere.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/9/4393deb7b45c62f1edb0bed49b8a71156b887295.gif)

---

<div class="post-metadata">

**Author:** ![Serg\_Karmach](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Serg\_Karmach](https://forums.unrealengine.com/u/Serg_Karmach)\
**Post date:** [February 27, 2021, 10:09pm UTC](https://forums.unrealengine.com/t/endless-world/479530/3 "2021-02-27T22:09:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [February 28, 2021, 6:32pm UTC](https://forums.unrealengine.com/t/endless-world/479530/4 "2021-02-28T18:32:26Z")

</div>

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

So the chunks would fly past like that?

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/b/7/db7a468da960b80d3a9555de8461a851842a78e2.gif)](https://gyazo.com/4d82bc754c150c626d29072a30402e2b)

---

<div class="post-metadata">

**Author:** ![Serg\_Karmach](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Serg\_Karmach](https://forums.unrealengine.com/u/Serg_Karmach)\
**Post date:** [March 1, 2021, 4:28am UTC](https://forums.unrealengine.com/t/endless-world/479530/5 "2021-03-01T04:28:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 1, 2021, 8:25am UTC](https://forums.unrealengine.com/t/endless-world/479530/6 "2021-03-01T08:25:11Z")

</div>

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](https://docs.unrealengine.com/en-US/BuildingWorlds/LevelStreaming/index.html) work for you?

---

<div class="post-metadata">

**Author:** ![Serg\_Karmach](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Serg\_Karmach](https://forums.unrealengine.com/u/Serg_Karmach)\
**Post date:** [March 1, 2021, 9:56am UTC](https://forums.unrealengine.com/t/endless-world/479530/7 "2021-03-01T09:56:04Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 1, 2021, 10:56am UTC](https://forums.unrealengine.com/t/endless-world/479530/8 "2021-03-01T10:56:02Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/8/3/4836f78cc14690c96a66506b87549e3ea94c3b45.gif)](https://gyazo.com/85e9ebfba5c7316358470848552bb390)

From the player’s perspective:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/c/d2ca4f8541160667fab2bdfa1b58138a51e20cb3.gif)](https://gyazo.com/6812a0a84727347f67adbc51e28bad0a)

You’d need to iron out many kinks.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 1, 2021, 11:00am UTC](https://forums.unrealengine.com/t/endless-world/479530/9 "2021-03-01T11:00:56Z")

</div>

@ClockworkOcean

Is this your new thing after Zof?!

---

<div class="post-metadata">

**Author:** ![Serg\_Karmach](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Serg\_Karmach](https://forums.unrealengine.com/u/Serg_Karmach)\
**Post date:** [March 1, 2021, 11:08am UTC](https://forums.unrealengine.com/t/endless-world/479530/10 "2021-03-01T11:08:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 1, 2021, 11:50am UTC](https://forums.unrealengine.com/t/endless-world/479530/11 "2021-03-01T11:50:52Z")

</div>

Yes, very early days 🙂

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/c/6/6c6de970d842a0b65d9c9bb93690ec7d80306a0b.gif)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 1, 2021, 11:52am UTC](https://forums.unrealengine.com/t/endless-world/479530/12 "2021-03-01T11:52:53Z")

</div>

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

 ![331187-chunkychunk.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/4/c948ceb2ef4ed942df27153dd70992b8c6beebae.jpeg)

- 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

 ![331184-delay.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/a/41a2ee6ba3736905d476e45f5d7c7b4de2436b84.jpeg)

- and the generation in this case:

 ![331186-generate.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/e/56e6df8cebe6e8febbe7c1e073408074cacade55.jpeg)

- 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.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 1, 2021, 11:59am UTC](https://forums.unrealengine.com/t/endless-world/479530/13 "2021-03-01T11:59:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 1, 2021, 12:03pm UTC](https://forums.unrealengine.com/t/endless-world/479530/14 "2021-03-01T12:03:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 1, 2021, 12:08pm UTC](https://forums.unrealengine.com/t/endless-world/479530/15 "2021-03-01T12:08:45Z")

</div>

> 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.

 ![331167-screenshot-4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/e/f/def214d9548d6c580a25ecb7291c9453428fc030.jpeg)

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:

 ![331168-screenshot-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/2/57289a31f175ff01b06b9704f46f944666b9b638.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 1, 2021, 12:12pm UTC](https://forums.unrealengine.com/t/endless-world/479530/16 "2021-03-01T12:12:21Z")

</div>

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

I’m gonna try that transform node 🙂

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

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 1, 2021, 12:13pm UTC](https://forums.unrealengine.com/t/endless-world/479530/17 "2021-03-01T12:13:30Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Serg\_Karmach](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Serg\_Karmach](https://forums.unrealengine.com/u/Serg_Karmach)\
**Post date:** [March 1, 2021, 1:54pm UTC](https://forums.unrealengine.com/t/endless-world/479530/18 "2021-03-01T13:54:25Z")

</div>

Thanks for help dude! That’s awesome!

---

<div class="post-metadata">

**Author:** ![sguerrer92](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sguerrer92/32/777247_2.png) [@sguerrer92](https://forums.unrealengine.com/u/sguerrer92)\
**Post date:** [March 13, 2024, 2:50am UTC](https://forums.unrealengine.com/t/endless-world/479530/19 "2024-03-13T02:50:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 13, 2024, 7:48am UTC](https://forums.unrealengine.com/t/endless-world/479530/20 "2024-03-13T07:48:13Z")

</div>

The little planet?

[Next page](https://forums.unrealengine.com/t/endless-world/479530.md?page=2)
