Hi! I'm trying to make a japanese drawing game where the player must draw characters and the computer will recognise them. For context, this is not OCR, that's already done.
I'm wondering how I'll do this. In this game, two things must be taken into consideration
- The direction of the stroke
- The order of the strokes (whether the horizontal line came first or the vertical line)
- The shape itself
I've attached a photo of how my current system looks like for the character ち, at least in my head. In blue, I'll define Area 2Ds which will serve as the "acceptable drawing area" for the stroke. If a stroke is mostly within the blue, it'll be marked as correct. A player must take the first stroke, which is the horizontal line, from left to right (that's how it's taught), and the second curvy stroke from top to bottom. Here's where I'm stuck.
- Detecting the drawing itself (whether it comes into the blue area)
- Finding the order of the strokes (Could do this by storing them in an array)
- Making sure that each Area2D aligns with the strokes (E.g. the player decides to draw in one corner instead)
- Finding the direction of the strokes