Download

[Help] How to improve performance while making a tile based game,

I was inspired by Octopath Traveler and have been trying to make my own 2.5D RPG game. I’m still trying to get the art style right, but I’ve been having a lot of trouble create levels.
The main issue I’m having is with the performance. I’ve been working on several different solutions, hopefully someone will know what I’ve been doing wrong. For all of these methods I used world aligned materials, with temporary sprites I created.

Hand Placing Static Meshes
I take 1x1m box meshes and drag them onto the screen and manually place them in the location I want. This is the method I want to avoid using the most because it 1) takes a long time 2) when i start dropping hundreds of meshes the game starts to slow down.

Using Landscape tools
I’ve tried using landscape tools like layers splines. The main issue I’ve had with this is that landscape tool are too organic. That’s great for most games, but the art style I’m trying to imitate is blocky and angular. This method could work if I could paint and model onto the landscape in perfect squares, but the default brushes are all circular. Is their a way to custom load in brushes so I could Model and Paint in finite Block?

Large Static Meshes
Since I’m using world aligned textures I can use large static meshes and to make a level. This method has the benefit of not slowing down during runtime. But I’m worried this might end up making the scenes look too blocky and might make it harder to make small edits further down the line. In Octopath they used modular meshes to add organic elements to the scenes maybe if I do the same I can get a good balance of block and organics.

Custom Level Editor Using "Editor Utility Widgets"
Using editor utility widgets I can place down 1x1m blocks with a button click, place down multiple blocks at the same time, and even put them down in a square. I also made it so I can retexture, slant and split blocks. It’s pretty fast and adaptable system. Similar to hand placing static meshes this method really slows down during runtime probably even more so because I need to put all the static meshes in blueprints to make it compatible with EUW’s. This method would probably work if there was a way to easily merge the static meshes of a lot of blueprints and be able to divide them back again if I need to make edits to the level. Is there a way to do that? Maybe get rid of all the edges of blocks that aren’t exposed.

These are all the methods I’ve used to create a basic level if anyone could tell me how to improve them, or suggest a completely different method that would improve performance it would be greatly appreciated.

World aligned materials are your first problem. They are expensive.

Hand placement is OK after .18 I think. The engine just instances on its own.

Landscape tools.
model a flat image in Krita or anything that works natively in 16bit. And/or create yourself a custom set of brushes so that you can sculpt the terrain with them. I think since .24 you may even be able to get the brushes to snap.

Large meshes can affect performance negatively because they end up being rendered when they shouldn’t be. It depends on the mesh, its size, and how many vertex it has - as well as what material it has on.

I’m not sure what the last one is, But. If the meshes aren’t instanced you will end up having performance issues when too many are added to the scene - like anything else.

Last things
if you dont need dynamic lights, bake the light. You’ll get way better performance.
Most of the cost is due to shading. Shading is due to light calcs.
if you are using raytrace you have no way to reduce this cost.
if you are using dynamic light you can change settings around to make it a bit cheaper.
if you are baling the light, the cost is close to 0 anyway.

Just wanted to reply on what I’ve been testing.

Using Landscape tools
Tested out making a landscape while using a custom square brush to add depth to the scene. The problem is even when the brush is a perfect square landscape tools automatically add a little slant to the edges making every edge into a ramp. Is there a pure extrude tool in Unreal? Also, while painting textures like stone roads the painted textures end up mixing together creating a gray blob. This could be fixed with world aligned textures but now I know those are taxing. All in all it looks like landscape tools might need some tweaking.

Custom Level Editor Using "Editor Utility Widgets"
I was able to improve the processing speed by using a single blueprint with instances of the block within it rather than having multiple blueprints in world with the same static mesh in them. The new problem is that I now can’t change the material for every individual block to give variation. I think I could change the material by using hierarchical materials but I’m gonna have to do some research.