Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(6 edits) (+1)

I̶ ̶d̶o̶n̶’̶t̶ ̶h̶a̶v̶e̶ ̶a̶ ̶t̶u̶t̶o̶r̶i̶a̶l̶ ̶f̶o̶r̶ ̶i̶t̶ ̶y̶e̶t̶ ̶-̶ ̶b̶u̶t̶ ̶i̶t̶’̶s̶ ̶p̶r̶e̶t̶t̶y̶ ̶s̶i̶m̶p̶l̶e̶.̶ Have the first card blank, make more cards and drop a Patternshop widget onto it. Arrow keys to flip through the layers. The checkbox enables composition.

To incorporate it into yours I think would be pretty simple. I might have to update it for your use case, because I didn’t read your code closely. So, a few things might be need to be refactored. But, overall, I think it mostly works how you have this set up, it would just need a few tweaks.

EDIT: There’s a demo HTML on my Patternshop page, now.

(+1)

I’ve simplified Neo even further & removed the enable button. I hope this is close to what you need.

It has several properties for programming:

.canvas: get/set the image
.clear: clear the image
.locked: disable composition

And most importantly:

.active: sets the “active” card name. composites from the first up to but NOT including the active card. it assumes that you are drawing on active and thus don’t want it composed. setting it to nil automatically detects what card it is on.

This means you can have exactly one patternshop widget on the first page and then dynamically enable what it composites up to. When the user switches layers, copy the card image to the corresponding layer.

.active assumes it will composite from “first” up to but not including the “active”. You might want to have it do a 1 drop in the script if you want the first layer to be on the second card.

The paste in the community page is updated and I’ll be updating the HTML and codeberg soon.