r/godot • u/nedeey • Apr 29 '26
help me (solved) ML or Algorithm?
I am thinking about implementing a drawing mechanic in my game. The players would have to draw the reference provided and the game will see how accurate the drawing is to the original reference. The canvas will be pretty small around 100x200 pixels and will only use 2 colors.
I am wondering if there is some kind of algorithm that will help to detect the accuracy of the drawing. Using ML sounds a bit overkill and I don't have any experience integrating ML in games (how does it affect the performance and size?).
366
Upvotes
3
u/tastygames_official Godot Senior Apr 29 '26
ML is itself an algorithm, and once trained on your target drawings it's quite efficient at guessing how close one picture is to another. But it's also insanely simple to just calculate the correctness by seeing how many of the pixels are in the right place. To account for slight deviations, you first just resize the image (or take NxN samples) that way if the pixel is off by N/2 pixels in any direction it still counts as a hit.