0 votes

I'm making a procedurally generated world for a Minecraft like game. I'm using OpenSimplexNoise.new() in a sprite and taking the 3dv. I can generate a 16x16x16 cube and its fine... except a texture error but that's not a priority. I can generate up to a 40x40x40 cube but I have little or no framerate. Also, it takes quite a long time. Each type of block is a scene that gets instanced as a child of my "world" scene. Is this the issue?

in Engine by (12 points)

How exactly do you generate those cubes? Do you use MeshDataTool for that? If you are creating geometry from scratch, that might explain why your game is so slow. I would recommend that you create a Gridmap node an populate that with predefined cubes instead. Would this work for you?

block scene:
the number shows the indent level.
(1) Spatial
(2) Spatial
(3) Sprite X6 (1 for each side of the cube)
(2) MeshInstance (CubeMesh)
(3) StaticBody
(4) CollisionShape (BoxShape)

I will look into Gridmaps. Thank you.

After a family vacation, I've returned and completed implementing a grid map. However, when I generate a world chunk I see only the blue collision boxes of the blocks. how can i get the MeshLib to read my sprite textures? do i have to use models?

Could you post the steps you took to create the Gridmap? Generally speaking, you do have to use models for your MeshLib.

first, I made a "blocks.tscn" the root is spatial and each block is a MeshInstance with a
StaticBody and CollisionShape. I gave each MeshInstance an albedo with texture in VS shaders (I don't know anything about shaders)... i then used the scene tabs convert to mesh library and used the meshlib file as my theme in my "gridmap.tscn" but i don't see the albedo changes and when i generate the world the albedo change still isn't there.

Check this discussion: https://github.com/godotengine/godot/issues/24130

What I did to retain the materials and all is I saved those separately in my materials folder and I then reassigned them to the meshes of the MeshLib and it works.

Other than that, does this Gridmap solution work for you? Does it make your game run faster? Tell me so that I can write an appropriate answer to this question.

Works for me? No, or at least not how I'm currently implementing gridmaps. I can spawn 4 times than before and there isn't frame rate lag. However, 200 thousand blocks aren't much when I'm thinking each block is 6 inches and I want a whole world. Is there a way that i can improve it further?

For added detail.
20 x 100 x 100 is the largest I can generate. It has about a 30-second start-up time and if I tell it to go any bigger.. well I haven't found the start-up time for that because it's so long. It just sits there no errors or anything.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.