Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

SpookyNeko

4
Posts
1
Following
A member registered Aug 19, 2024

Creator of

Recent community posts

Hey, thanks for the feedback! I'd quite like to expand this just a bit more for an after-Jam version and I really like the materials idea (perhaps it could feed into a more interactive forging part of the game).

Also, I tried to leave the blueprint blank to see what would happen

Good job with bug finding too. I'd seen the first one in development but hadn't put in time to check for that case or provide a sensible way to show the player - I figured the visible NaN was a division-by-zero error - and yes, it turns out the restriction on only counting areas that have a sketch in either the reference or the players drawing (to make scoring make more sense) leaves you with scoring out of zero for an empty player sketch.

I then tried to do the opposite (because, again, why not?)

Great QA thinking! I hadn't even tried the opposite myself (didn't have the patience to fill in the canvas without some kind of fill tool) and the result makes sense for this. The character getting replaced is a known mismatch between how the sketch area and sprite versions are positioned so they get end up covered by the sprite sized sketch in some directions. I'd seen the overlap but it's more obvious with a completely filled sketch.

(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.

Hey, thanks for the feedback! I did have more in mind for the NPCs, things like queueing, feedback based on how well you met their expectations, perhaps being paid for the commission and so on... I'd like to work on this a bit more for after the Jam, so all ideas are welcome.

Hey! Thanks so much for the heads up, I'll take a look and see what I can do. I'd seen a few issues with running the game locally but didn't think itch itself was flagging anything.