# Cashgen - (kinda) Infinite Procedural World Generator

**URL:** <https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [May 6, 2016, 4:37pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131 "2016-05-06T16:37:03Z")\
**Posts on this page:** 20\
**Page:** 17

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [August 8, 2017, 9:36am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/329 "2017-08-08T09:36:45Z")

</div>

> [@mid\_gen;747102](#):
>
> You should be able to make a decent in-editor world generator that’ll spit out static meshes for you with the click of a button, using the code in the CGWorld class.
> 
> Getting there with the refactor…
> 
> For anyone interested in what I’m doing…I’m throwing away the old method of having a square grid and flipping rows/columns of tiles across to follow the pawn. It’s simple and crude and works ok for a single player but kinda sucks for multiplayer.
> 
> New system has a single Manager that you register a pawn with that you want terrain built around. The manager tracks the pawn and places tiles from the free stack in any sectors with X radius of that pawn. It periodically sweeps that the radius of the pawns and marks each sector as required. If a sector isn’t marked in a timeout period, the tile is hidden and returned to the free stack. Makes replication much easier too :\>

Yes, it’s definitely possible to do so. But I do not think that will be needed after all. Your plugin will have all the features, and more, that we need to make our game.  
And you are doing an awesome job on this plugin. To be honest, there would not be a game without this. :o  
And it’s kinda rare to see work still be done after over a year on the forums. So, thank you for sticking around with it and continue developing it. That’s awesome and a good inspiration.

---

<div class="post-metadata">

**Author:** ![speedpacer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@speedpacer](https://forums.unrealengine.com/u/speedpacer)\
**Post date:** [August 8, 2017, 5:28pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/330 "2017-08-08T17:28:22Z")

</div>

Hey mid\_gen, would it be terribly difficult to make the tiles start building from the pawn outward, maybe putting the N,S,E,W directions in separate threads so they spawn outwards at the same time, and then applying a materializing effect, such as [Materialize VFX](https://www.unrealengine.com/marketplace/materialize-vfx) for example, as it’s spawning?

Not asking you to do it, just wondering how difficult you think it would be, if it’s even worth tackling.

---

<div class="post-metadata">

**Author:** ![AinSophAur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AinSophAur](https://forums.unrealengine.com/u/AinSophAur)\
**Post date:** [August 11, 2017, 10:57am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/331 "2017-08-11T10:57:04Z")

</div>

@mid_gen

We are currently encountering an we think is related to the plugin. With that said. We are not sure, but we have to start somewhere to figure it out.  
When we make a CGWorld in it’s own streaming level, all but 1 world tile is owned by the actor of the streamed level. The rest of the tiles seems to belong to the persistent level. It seems like the CGWorld’s does not have an owner set.

I have done some research, and a while back, this was an that Unreal Engine had. But I’ve managed to get all the other actors I spawn to belong to an owner, and that solved the for those actors.  
So, from what I can see, the CGWorldsFace actors has some issues with this owner thing.

My guess is that this will be solved when the refacturing of the “engine” of that part of the plugin is done?

---

<div class="post-metadata">

**Author:** ![OmniMachina](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@OmniMachina](https://forums.unrealengine.com/u/OmniMachina)\
**Post date:** [August 13, 2017, 1:32am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/332 "2017-08-13T01:32:07Z")

</div>

Is there a way to increase the overall “resolution” of the terrain?

I’m playing around with XTiles, YTiles, Unite Size etc.

But my terrain still looks blocky

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [August 19, 2017, 9:00am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/333 "2017-08-19T09:00:52Z")

</div>

> [@OmniMachina;749276](#):
>
> Is there a way to increase the overall “resolution” of the terrain?
> 
> I’m playing around with XTiles, YTiles, Unite Size etc.
> 
> But my terrain still looks blocky

Unit size will define the ‘resolution’ of the terrain.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e54d9d0d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e54d9d0d](https://forums.unrealengine.com/u/anonymous_user_e54d9d0d)\
**Post date:** [August 19, 2017, 4:45pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/334 "2017-08-19T16:45:26Z")

</div>

Is there a way to utilize this system in a blueprint project instead of a C++ project?

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [August 27, 2017, 2:59pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/335 "2017-08-27T14:59:01Z")

</div>

Should be able to compile the plugins and drop them into a BP project? Not something I’ve tried though (or have time to) I’m afraid. Sure some people here are more clued up in that regard.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/5/785be3171bbc50ed65f8d798a3252571a12f8e85.jpeg "CashGen - Procedural Realtime Terrain Generation Plugin for UE4 - Update 2017-08-27") ](https://www.youtube.com/watch?v=a7HrfeyUcvk)

Finally got some time to sort out the tile management stuff and move away from the simple column/row flipping. First step to getting multiplayer working.

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [August 27, 2017, 5:41pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/336 "2017-08-27T17:41:10Z")

</div>

Nearly there…finally!

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/9/b495a4043b80344a1a5f3d538f001d6405f75f6c.jpeg "CashGen - Procedural Realtime Terrain Generation Plugin for UE4 - Update 2017-08-27") ](https://www.youtube.com/watch?v=0ClZ7bxpt4Q)

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [August 27, 2017, 8:28pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/337 "2017-08-27T20:28:55Z")

</div>

Got some bugs to work out still, but multiplayer support is kinda working.

> **[GitHub - midgen/cashgenUE at MULTIPLAYER\_SUPPORT](https://github.com/midgen/cashgenUE/tree/MULTIPLAYER_SUPPORT)**
>
> MULTIPLAYER\_SUPPORT

Create a CGTerrainManager blueprint as usual and add to your level, set it up as per below for a demo scene.

Add a CGTerrainTrackerComponent to any actors/pawns that you want terrain around (It’ll need to be one with replication support like the third-person sample for multiplayer)

When you start, any actor with the component will find and register itself with the TerrainManager (once it is ready). The TerrainManager will then ensure there are terrain tiles around that actor.

All the terrain is done client-side so there is no replication involved other than the pawn locations. Probably all sorts of opportunity for jankiness and bugs but I’ll deal with that later 🙂

 ![cHKmalhYStedifKrOXMhgA.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/1/a1703fefed751b365d9771dc2818a5a6c47fc1f3.png)

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [August 28, 2017, 4:45pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/338 "2017-08-28T16:45:58Z")

</div>

Multiplayer fixed and working. Just need some cleaning up and adding in LOD support + transitions etc.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/9/ce92932e5c5c4e479b3b684f84ca296b4555805c.jpeg "CashGen - Procedural Realtime Terrain Generation Plugin for UE4 - Update 2017-08-28") ](https://www.youtube.com/watch?v=0kpmiBxNeMc)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_68c04185](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_68c04185](https://forums.unrealengine.com/u/anonymous_user_68c04185)\
**Post date:** [August 29, 2017, 3:31am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/339 "2017-08-29T03:31:29Z")

</div>

Any plans doing multiplayer for world generator?

---

<div class="post-metadata">

**Author:** ![ErnestoEASD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ErnestoEASD](https://forums.unrealengine.com/u/ErnestoEASD)\
**Post date:** [August 29, 2017, 4:55am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/340 "2017-08-29T04:55:18Z")

</div>

WONDERFUL JUST WONDERFUL!!! I love it

---

<div class="post-metadata">

**Author:** ![vbs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vbs](https://forums.unrealengine.com/u/vbs)\
**Post date:** [August 31, 2017, 4:44pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/341 "2017-08-31T16:44:11Z")

</div>

Hi, I’ve been checking out your plugin on GitHub, and would love a more comprehensive explanation on how to set this up in C++ only, without blueprints if possible 🙂 Thanks!

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 1, 2017, 3:43pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/342 "2017-09-01T15:43:48Z")

</div>

> [@vbs](#):
>
> Hi, I’ve been checking out your plugin on GitHub, and would love a more comprehensive explanation on how to set this up in C++ only, without blueprints if possible 🙂 Thanks!

It’s not fundamentally any different in C++ over blueprints, you should be able to follow the same instructions, just substituting the blueprint method calls with the underlying UFUNCTION or UPROPERTY.

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 1, 2017, 3:48pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/343 "2017-09-01T15:48:36Z")

</div>

Current roadmap btw :

- Finish the multiplayer refactoring (almost done, just working on LODs)
- Do an optimisation pass
- Clean up code and stabilise the API (e.g. the new Tracker component, setup method, config struct etc)
- Stick a 1.0 tag on it, tidy up documentation, make some new tutorial videos.
- Add a new prop/foliage scattering system back in
- Find/create some materials

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 5, 2017, 6:23pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/344 "2017-09-05T18:23:58Z")

</div>

Multiplayer LODs working on multiplayer branch.

Now for some cleanup.

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 8, 2017, 7:45am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/345 "2017-09-08T07:45:13Z")

</div>

Big cleanup and refactor. Moved to a faster update path and more efficient data structure with the RMC so performance has improved markedly.

Tracking component will now hide and freeze characters until terrain is complete.

Need to fix the wonky broken normals and tangents.

---

<div class="post-metadata">

**Author:** ![Wilken](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wilken](https://forums.unrealengine.com/u/Wilken)\
**Post date:** [September 8, 2017, 10:05am UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/346 "2017-09-08T10:05:41Z")

</div>

Ah that sounds just fantastic! Having a great time reading your code, thanks! 🙂

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 8, 2017, 1:21pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/347 "2017-09-08T13:21:45Z")

</div>

> [@Wilken](#):
>
> Ah that sounds just fantastic! Having a great time reading your code, thanks! 🙂

Don’t judge me! There’s some awful code in there 😛

It’s getting better though 🙂

---

<div class="post-metadata">

**Author:** ![mid\_gen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mid\_gen](https://forums.unrealengine.com/u/mid_gen)\
**Post date:** [September 9, 2017, 5:09pm UTC](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131/348 "2017-09-09T17:09:25Z")

</div>

> **[GitHub - midgen/cashgenUE at MULTIPLAYER\_SUPPORT](https://github.com/midgen/cashgenUE/tree/MULTIPLAYER_SUPPORT)**
>
> MULTIPLAYER\_SUPPORT

Multiplayer branch is now at parity with . I’ll merge it in the next couple of days. Various cleanups and stuff gone in

[Previous page](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131.md?page=16)

[Next page](https://forums.unrealengine.com/t/cashgen-kinda-infinite-procedural-world-generator/63131.md?page=18)
