Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Hi! Thank you so much for the feedback.

Might I ask how you did the blueprint vs image comparisons

Of course!

So the images you see (the commissions) are just standard sprites with a randomly chosen texture assigned for each NPC. For the drawing, the mouse coordinates over a second sprite with its own texture are used to center a small mask which is used to 'paint' your design. Both of these images are the same width, height and format (single channel), and the comparison result is the difference between equivalent pixel values from the two images.

The implementation in this was done fairly naively due to handle some extra details (see below), but it's essentially a pixel-by-pixel comparison between the values of each pixel between the two images, where each pixels score is 1.0 - differenceValue. For the scoring, we compute the actual score (sum of pixel scores) and the max potential score (simply width * height, this is essentially a no-difference value, a perfect replica) and then it's just actualScore / maxPotentialScore.

There's a few other small details to make the comparison make more sense, such as only pixels that are set in either the reference image or the one you drew are used. This limits the image comparisons to pixels that should be there or that were there in the one you drew, as otherwise the score ends up interpreting what is essentially 'empty space' in both images as a good result, when really it should be ignored unless there's a visible image.

Happy to post more specific code or I could put some of the code into an example into a repository to look at.