I am currently creating a procedural map generation system in a personal project, similar to Minecraft in theory. Each block is the same Actor blueprint, with variables getting set at spawn by looking into a database.
But, strangely, when I face the generated world (and the 150x150 blocks), it seems the framerate drops a lot. Each block is a 6 faces mesh only, no material included for now, which isn’t expensive at all for the engine.
I already tried to force a mesh instead of questioning the block
database, and it didn’t change anything. When I look at my blocks, the Triangles drawn of “stat rhi” are at an average of 745.000, but I drop from 60fps to 20~30.
Here’s a few screenshots of my blueprints ; one of my block blueprint (BP_Item), one of my map generation, and one of stat unit.
All these observations were made with the help of one of my teachers ; Consider that I may not be that used to Unreal. Does someone have any idea of where that problem could come from ? If you need any information, feel free to ask me.
Yes, I need to spawn many of these items, just like Minecraft.
What do you mean by “work the BP a bit” ? For now, I just went to the Details tabs of Class Defaults & Class Settings of the BP to see what could be checked/unchecked, but even when I disable ticks or shadow casting of all of the BP’s components (which are a collision box and a static mesh in a default scene root), it doesn’t change anything.
I’ve already searched how to instance meshes ; but I didn’t quite get how to do so.
By thinking about it, I imagined a system where all of my map elements would be static meshes, interpreted by only one BP that would compare the ID of the static mesh (or something like that) to the database to look for what it is supposed to be doing when interacted with. I’m not sure it would be efficient though ; especially when some items aren’t static, like vehicles for example. Is it a good idea ?
It’s a whole game concept, I’m afraid I can’t really say much
I can tell you if you want something like Minecraft, you can’t do it in blueprint, you will need CPP.
If you are thinking of making all meshes stored in a data table, I can’t say that wouldn’t work. Do you want every single mesh interactive? Most people are happy with ‘some’, which mean those can just be blueprints.
I used to code back in 2018 in C++ I’m think I’m pretty rusty now ! If I can’t proceed with BPs at all, then I’ll get back to it. I’m going to try again with other solutions I find online.
I think only a few elements aren’t very interactive ; many can do things when interacted with or bumped, even if these are small effects. I’ll try the system I imagined earlier just to check ; and see if it works at all.