How do you properly make a tile-based floor?

Hey, I have 74x74 floor and you can build walls (static meshes) on top of every 2x2 tile. I did this via conditioning collision and visibility. But there’s a lot of lag which tells me it’s not the right way to do. Any suggestions?

Thanks.

If you make the floor one plane and tile the texture 74 times(by inputting 74 in texture coord node). You should have a floor with a tiled texture.

If for some reason you actually need to use tiles, make sure you just use one material for the mesh and make sure they’re instanced.

Here:


And you can also make this, for material instance:

You can than control material parameters from blueprints (event graph or construction script) and make all fancy stuff:

Finally, some answers :). I did post the same question but with way more details over here How to properly make a tileset in Top Down? - Blueprint - Unreal Engine Forums

But so far, nobody has replied. So my question is, am I doing the right way by putting instanced meshes on every single tile and “building” walls by activating collision/invisibility and not actually spawning them?

I think putting meshes is a really bad idea, especially for top down. If you really want to make them in mesh I would suggest to make them in bigger plasters with few tiles on it, and optimize the mesh as much as you can. And do not forget about creating a lower LOD which could be flat just with a texture. Although necessity of lower LOD will depend if you want to zoom the camera out, or not.
You could also try to use world space coordinates texturing which could be very handy to keep tile scale independently of mesh scale or mesh position. But I wouldn’t use that for walls that are rotated more than 45 degrees in world space.

Edit: BTW, what are you trying to create, some mechanics similar to Minecraft or Dungeon Keeper? If yes, there definitely are some other ways of mesh generation, but in that case I won’t be much of help. It’s much more complicated. Voxel stuff, or other mesh merging…
Good luck anyway.

Thanks dzodzu for the help. Yes, I’m trying to create a single level with mechanics of somewhat similiar to Dungeon Keeper. So basically, you just need to create walls/towers on these tiles for the whole game. I removed the meshes’ shadows and made them Static (instead of Moveable) and that helped A LOT with the FPS. But normally, the optimization is done with profiling towards the finalization of the product or at least I hope so.

Anyways, why are textures so important at this stage? I really just want to get the functionalities working, like building a simple tower on a tile. If there isn’t any other, I’ll continue this way and see where it leads me. Cheers :slight_smile:

I’m big fan of DK :smiley:
In fact the texturing is not relevant at this stage. You will have to find some way to exchange repetitive tiles with bigger chunks of planes. Otherwise you will always kill performance.
78d8fc4f187c6d69d5399bb5786cd8bae1622db1.jpeg
Finding where and to how big plasters will be your biggest challenge in my opinion.
Cheers.

If you sir did that drawing just for me, I’m impressed. Thanks for that :stuck_out_tongue: but yeah I came here hoping someone could direct me in the right direction. I just need to know which way I need to do it, I’ll learn it eventually.

Other than creating static meshes (or instanced) so they could act like a unit just like in any RTS, I don’t see what other way is possible with UE4.

Also, do you play War For The Overlord? It’s a non-official DK-based game, it’s awesome :slight_smile:

Nah, no problem. Took me like 5 minutes. I didn’t play War For The Overlord, but my brother did. It’s quite good, but he said NPCs AI freezes at some point, or the game crashes from time to time. If I remember correctly it’s done in Unity3d engine which explains why that happens, lol.
I’ve used Unity for almost two years, and didn’t accomplish anything in it for various limitation reasons.
Main reason is because I’m not a programmer and Playmaker is very limited and slow.
And speaking of devil, in Unity there is almost no instancing, or rather, to create an instance there are so many ridiculous conditions that makes them completely useless. So basically what you are trying to do here would be impossible haha.

Anyway, I wish you best luck with your project. Cheers.

Thanks man.

Alright, anyone else might be able to help?

Hey, I just thought about something. In UE 4.12 they are planning possibility to change vertex color of the objects at runtime.
I think you could determine where walls, or determined tiles should go by vertex color of a hidden plane. You could paint it and remodel your map even in realtime!
They mentioned it in a video about Paragon. I don’t know yet how you could accomplish it, but maybe that could work somehow?

Cheers.