Training Stream - Procedural Room Generation - Jan. 6th, 2015

Has anyone found anything useful with one? I’ve been trying to understand it through messing with things but with all the infinite loops and the materials that won’t change regardless of meshes I’m having an extremely hard time parsing any useful information from without already being a programmer.

Hey ,
In the GridData Blueprint, you’ll find that each Instanced Static Mesh object has their materials being overriden, so if you just swap the mesh, it’ll still get the material set in there. So you can click the little trash can icon on each of the Instanced Static Mesh Components -> Rendering -> Override Materials properties to stop it from overriding the materials on your meshes.

Looks like I forgot to include my project settings :\ Working on getting that fixed. But, in the mean time, you can change the Blueprint Loop Iteration in Edit -> Project Settings -> General Settings -> Maximum Loop Iteration Count. I set mine to like 10 billion or so (defaults to 1 million), allows for maps of just about any size.

Ok, someone gotta help me out.
In the learn tab, I see the video. But where is the project? :eek:

Turn Based Strategy is the name of the project - Scroll to the bottom of the learn tab

Tried that and is the result I get.

I tried using several different materials & meshes after turning off the override materials and it just kept giving me a blank grey mesh.

Also any attempts to create a map of dimensions greater than 82 by 82 leads into infinite loops.

Heya ,
I’ll look into the gray mesh thing today.

If you read the 2nd part of my previous message, I tell you how to fix the looping bit:

Edit (Menu) -> Project Settings -> General Settings -> Maximum Loop Iteration Count, set to… well I have it set to like 10 billion

: Spelling, scroll not sroll =)

Oh sorry. Yes that works I up’d it and tried some larger sizes. I’m actually rather surprised at just how quickly things load even by tripling the dimensions.

Back-burned :frowning:

Thank you! I guess I’m blind… :rolleyes:

The gray meshes are caused by the Material not enabling its usage for Instanced Static Meshes. Normally, if you apply a material to a mesh in the editor (or in sub editors, including the components view), Unreal will just handle setting that material’s usage to match what you’ve put it on (like applying a material to a particle system will enable usage with particle sprites).

doesn’t seem to be happening here. I’m guessing that it’s because there’s no actual instance of the mesh on any of the Instanced Static Mesh components till the game is running, and it doesn’t update the material in the running game.

Just any material you want to apply to these components, go into the material editor, select the material node (the one you wire everything into) and in the Details Panel scroll down to Usage, and Enable “Used with Instanced Static Meshes”

Brilliant. The materials function just fine now! My own fault for not checking the material editor. :slight_smile:

I see “WorldData” in the Scene Outliner window. How do I add “WorldData” to the project? There should be a law that requires videos to be captioned.

The WorldData Blueprint (found in Game\Blueprints\Game) just needs to be placed in the level, but to actually utilize it the Level’s/Project’s GameMode needs to be set to TBS_Game (also found in Game\Blueprints\Game).

The TBS_Game GameMode is what actually does all of the lifting, the WorldData Actor is just a data Actor that has some variables on it that are exposed in the level editor.

Are there downloadable content for the project?

Heya ,

There’s currently no plans for additional separate downloadable content for project. That said, as the project expands, we will update it in the launcher.

Now if you are asking if the project is available to download: Yes it is! Just scroll down the Learn section of the Unreal Engine Launcher and look for “Turn Based Strategy” =)

Launcher->Learn->Gameplay Concept Example->Turn Based Strategy

In general, if you know its name, just type it into the Content Browser search bar and it will show it to you, even if in sub-directory.
Or if you know type, Filter that type, again, shows even if in a sub-directory.

, I was trying to follow your tutorial on creating procedural rooms but there is no closed-captioning and the project that had the floor and pillar didn’t work. I downloaded the “Turn Based Strategy” example, looked at the blueprint “code”, and got my project working.

We’re workin’ on getting CC for our videos shortly. It may take a little time, but the wheels are turning!

I’m having some problems increasing the scale of the resulting level.

I’ve tried replacing all the tile meshes with 500 unit versions (and putting the TileSize at 500) as well as modifying the collision actors accordingly, but when using the larger meshes it fails to dig properly (end up with a single room and the “dirt” still full everywhere).


Edit: For those that need it, just scale the Instanced StaticMesh for the floor (in TBS_Game), scale the tile size used in the calculation of the collision transform (in GridData), and fix the extents of the collision boxes (Tile_Collision and Wall_Collision). You may need to put in a local offset in the collision box to get it to line up exactly right (uncheck “Hidden in Game” to debug).

Example of my progress after I got scaling thing fixed, is 5x the scale of the TBS example, and that’s a default third person blue guy (who is a lot larger than the TBS map’s default scale).


I basically went and took a 500x500 tileset from a dungeon pack I bought and went and figured out how to scale the pieces down to fit the same size as the existing pieces, changed GridData to refer to the new (small build scale versions) meshes and then went through and tested until they were lined up correctly as well. That’s why scaling the floor mesh instancer (the parent of the rest) by 5 across the board works in my case (even though TileSize stays at 100).

Is there a way to make actors created at runtime stick around after the game is stopped?

I’ve spent some time removing dependency on the TBS_GameMode so that I can use a Call-In-Editor event to spawn levels, which works fine when called on Begin Play, but fails somewhere in the process when run from the Blutility drop down (via the Call-In-Editor event I made).

Edit: Got it working, though hitting play seems to “disappear” the instances and their transforms from the InstancedStaticMesh components. I set up a work around where I simply store the number of instances and the transforms for each, and then restore them on begin play (or via a Blutility event on GridData to refresh them in editor after playing).