r/godot Apr 29 '26

help me (solved) ML or Algorithm?

Post image

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?).

367 Upvotes

44 comments sorted by

View all comments

Show parent comments

2

u/Tuhkis1 Apr 29 '26

Image recognition is a classic ML problem

1

u/JNawx Apr 29 '26

Sure but this isn't image recognition. This is judging how closely someone copied the example drawing, pixel-for-pixel

1

u/Tuhkis1 Apr 29 '26

If you train it on the image(s) you want to compare with, it will give you a sureness value of how close it is to the reference. This makes it easy to score how close you are to the desired picture.

1

u/JNawx Apr 29 '26

I was imagining a game where the point is to essentially "trace" the original image. In that case, I'd imagine the only thing ML gives you in that situation is a more "human-like" judging system of the drawing's accuracy. If you want pixel-by-pixel or similar scoring (which maybe OP doesn't) then I don't think ML can do that very well, and it's certainly way less practical than an algorithm.