Hi everyone!

I'm a beginner in Godot, although I have a solid background in Java development and in game programing with libgdx.

I want to make a kemaru (aka tectonic aka suguru) in order to learn the basics of Godot.

I wonder what would be the good approach to do that? Using a tilemap? Using a grid control?

This is what a kemaru looks like :

I'd like to have each cell clickable so you can change the number in it.

Thanks for your help!

  • xyz replied to this.

    Doko Make a scene that handles all functionality of a single cell. Instantiate this scene from code as many times as there are cell and arrange the instances into a grid pattern.

    • Doko replied to this.

      xyz I started doing that and then asked ChatGpt, it advised to use a tilemap, but it doesn't look like a tilemap will allow me to programatically modify the background of a tile for example (which makes sense to me).

      Seems it was a good idea to come ask humans 😃

      xyz Oh and I was using a Label component for each tile, does that sound like the correct component to use?

      • xyz replied to this.

        Doko Yeah using labels is fine. The important thing conceptually is to make a reusable cell component. Godot's main way of doing that are scenes. So wrap all of the cell functionality into a scene. Put all the nodes you need in there (label(s), colored rects or sprites for background and borders, clickable areas etc..), attach a script to the top node of the scene that'll provide an api for controlling the cell state and just instantiate as many of them as you need.

        Technically, you could use a tilemap, but it'll impose some limitations on what you can do. With instantiated scenes, you have much more flexibility.

        • Doko replied to this.

          xyz Thanks I think that's the good pattern indeed, I'm implementing that way of programming.

          Thanks for the answers!