Best way to create Gridmaps

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nitwel

Hey everybody,

I got some questions about what the best way to maintain scaleable Gridmaps is.
I’m really new to game development and 3D modeling so I dont have much expericence.

I’m mostly grugging at time consuming tasks like getting new blocks into the game.
At the moment, I have a Blender project for every block containing its shape, hitbox and color which I then export to Godot via the dae-file format.

The issue I have with this that when impoting it to Godot, I have to open the dae, export the mesh as a .mesh file and the same with the collision box as a .shape.
I have a scene where I then import these .mesh and .shape files and export it as a meshlib.
Doing these steps for each block is really annoying and time consuming.

So my question is, is there a better way to create Gridmaps and what is the best way when you add more and more blocks.

Here are some options I could think of:

  • having all Blocks in a single Blender Project → export as dae → convert dae to meshlib directly. (How does this scale when you have 100+ blocks and more)
  • having a Blender Project for each group of blocks like grass blocks → export as dae → convert each dae to a seperate meshlib and having many gridmaps in the game:
    • 1 gridmap for all Grass Blocks
    • 1 gridmap for all Stone Blocks
  • have it in the current way how I described it at the top

My biggest fear is that I end up with a messy and unmanageable collection of Blocks which are hard to maintain or confusing and overwhelming to look at.

I hope some can share their experience and come up with a best practice.

Thank you all for taking your time reading this and have a nice day.
Greetings, Nitwel

I’m not sure this is what you’re looking for, but what I do is have one gridmap. I have the .dae files with the collision just using the _col ending to make them support collisions, then add each object type as a block and add those nodes into the GridMap instead.

andersmmg | 2019-06-18 17:51

:bust_in_silhouette: Reply From: Nitwel

I figured it out myself, took me some time but I figured out that when you move an Object while in edit mode, it is relative to the centerpoint of the object, but when you move it outside the edit mode, it does not change the center of the object.

I first thought that it was always relative to the global centerpoint because some YT tuts said that you have to have in mind that the obejct position is always relative to the global center because they would not use more than 1 object and I did not wanted to have 100 of blocks inside each other.

After I found out how it works and just moved them while outside the edit mode so I would not mess with the centerpoint.