How to make a grid drawing mechanic?

Godot Version

4.2.2

Question

I’m still new to Godot and programming and just about wrapping my head around platformer and RPG tutorials, but there’s a mechanic concept I hopefully want to try prototyping at some point when I get more experienced and I haven’t found many other people asking about anything similar so I’m not sure how you would go about starting it.

The idea is a grid with points between each intersection, and a line is drawn between the dots when you click them. It would check which points are ‘activated’ to determine what shape you’ve drawn, essentially a game based around having to draw certain things on the grid to progress. What I’m mainly wondering at the moment is whether this can only be done by making every single point and square on the grid its own node or whether you can make a script that can define each point on the graphic in pixels as point 1A, 1B, etc, because my worry is that if you try making a huge number of nodes (say you want 40 points) it’ll get super inconvenient to make and laggy if you want it as part of your onscreen UI.

I also thought about trying to make a freehand mode where you can draw on the grid freely without fixed lines, not sure if that’s easier to code. Any help with this extremely appreciated!

Hey,

I was sharing the sames worries when I was handling huge numbers of nodes.
But at my suprise, even with ~2000 labels no latency could be seen.

Obviously it will depends on your config I didn’t test on a wide range so far, but my tips would be:

Do it, don’t block yourself in things that you think will be problematic and might end up being fine

Also a freehand mode is easy to implement for the user input, but might become more tricky for the comparison part, it is to your liking

Hope that helped and good luck!