Members - Reputation: 106
Posted 24 July 2012 - 05:39 PM
I'm working on a personal project for android. I'm programming with actionscript 3 using adobe air.
I'm trying to make a game in which I show an image to the user, for example a triangle, and the user has to paint with his fingers on top of that image and trying not to leave the path. After he finishes drawing I want to check how good the drawing was compared to the original.
As a begginer I don't know where to start or how to implement such a thing.
What would you guys do??
Crossbones+ - Reputation: 2508
Posted 24 July 2012 - 06:08 PM
- For each drawing also store a version where each line has been expanded x pixels in every direction, so effectively a thick line
- Add points for the percentage of the thick line which is filled
- Subtract points for the percentage of what they drew which is outside the thick line
The beauty of the approach is that for scoring all you need to do is ask for each pixel "is it in or out of my ideal answer picture". If you don't care about the thickness of the line you would need to only take the length into account, e.g. if there is a filled pixel anywhere within the width of a segment, consider the segment filled.
It's so hard without diagrams!
Members - Reputation: 1399
Posted 25 July 2012 - 04:25 AM
might be of use to you