Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+5)

The following contraptions demonstrate Decker 1.25: contraptions can now be tools to help manipulate and organize the contents of decks. Be sure to upgrade before giving these a spin!

The decaying web sure is a bummer. Turn your gaze inward with

The SearchEngine Contraption:

Type a short phrase into the searchEngine textbox and it will scour your deck for any cards or widgets containing it (case-insensitive), producing a list of clickable links to the cards it finds.

  • If any card contains a widget named "noindex", it will be skipped.
  • The searchEngine considers the .text attribute of every widget. If you're using contraptions with content you want searched, expose it via a custom attribute!
  • The searchEngine also considers invisible widgets; you can add hidden fields to supplement the visible content of cards.
%%WGT0{"w":[{"name":"deckDeckGo","type":"contraption","size":[209,81],"pos":[149,239],"def":"searchEngine","widgets":{"i":{},"o":{"show":"none"}}}],"d":{"searchEngine":{"name":"searchEngine","size":[209,81],"resizable":1,"margin":[5,29,21,6],"description":"search the contents of your deck and easily navigate to cards with your search keyword(s).","script":"on change do\n s:\"%l\" format i.text\n r:0 take rtext.make[]\n if count s\n  each c k in deck.cards\n   if !\"noindex\" in c.widgets\n    f:s in \"%l\" format k\n    each w in c.widgets\n     f:f|s in \"%l\" format w.text\n    end\n    if f\n     r:r,rtext.make[k \"\" k],rtext.make[\"\\n\"]\n    end\n   end\n  end\n end\n if count r\n  o.show:\"solid\"\n  o.value:r\n else\n  o.show:\"none\"\n end\nend\n\non view do\n change[]\nend","widgets":{"i":{"type":"field","size":[203,20],"pos":[3,3],"style":"plain"},"o":{"type":"field","size":[203,51],"pos":[3,27],"locked":1,"scrollbar":1}}}}}

Want a more compact alternative to the pattern editor tool? Why not try

The PatEdit Contraption:

Scroll through any of Decker's 1-bit patterns, make changes, and watch the results live. When you're satisfied with the changes, you can even delete this contraption entirely!

%%WGT0{"w":[{"name":"patEdit","type":"contraption","size":[68,86],"pos":[29,38],"def":"patEdit","widgets":{"c":{},"p":{}}}],"d":{"patEdit":{"name":"patEdit","size":[68,86],"margin":[0,0,0,0],"description":"a mini pattern editor tool.","script":"\non edit do\n patterns[p.value]:c.copy[]\nend\n\non click pos do\n me.pattern:!me[pos]\n edit[]\nend\n\non drag pos do\n send drag[pos]\n edit[]\nend\n\non release pos do\n drag[pos]\nend\n\non change do\n c.paste[patterns[p.value]]\nend\n\non view do\n change[]\nend","image":"%%IMG2AEQAVgACAUAAAwEBIEABAQABAQEgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQIgQgECIEIBAiBCAQEAAQEBIEABAQADAQEgPgEBAAUBPgAD","widgets":{"c":{"type":"canvas","size":[64,64],"pos":[2,2],"scale":8},"p":{"type":"slider","size":[64,17],"pos":[2,67],"interval":[2,27],"value":2,"format":"%i","style":"compact"}}}}}

Tired of the same old 16-color Macintosh palette? Taste the rainbow with

The PalImport Contraption:

Pick any 16-color (or fewer) palette from LoSpec, save the "HEX" format, and use the "Import" button on this contraption to read in the file or paste it directly into the field. Then click "Apply" to replace Decker's default palette. If the input palette has 14 or fewer colors, they will be sequentially loaded into color slots 33-46 and leave pure white (32) and pure black (47) intact. Otherwise, 32 and 47 will be prioritized with the lightest and darkest color available in the palette, respectively. Just like PatEdit, when you're satisfied with the results you can delete this contraption.

%%WGT0{"w":[{"name":"palImport1","type":"contraption","size":[137,100],"pos":[334,171],"def":"palImport","widgets":{"button1":{},"button2":{},"p":{"value":"2e222f\n45293f\n7a3045\n993d41\ncd683d\nfbb954\nf2ec8b\nb0a987\n997f73\n665964\n443846\n576069\n788a87\na9b2a2\n"}}}],"d":{"palImport":{"name":"palImport","size":[137,100],"margin":[0,0,0,0],"description":"a tool for importing color palettes in the .hex format as used by lospec.com.","image":"%%IMG2AIkAZAACAYUAAwEBDYUBAQABAQENhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQINhwECDYcBAg2HAQEAAQEBDYUBAQADAYUAAg==","widgets":{"button1":{"type":"button","size":[60,20],"pos":[6,74],"script":"on click do\n p.text:read[]\nend","text":"Import"},"button2":{"type":"button","size":[60,20],"pos":[71,74],"script":"on color_dist a b do\n aa:\"%2h%2h%2h\" parse \"%06h\" format a\n bb:\"%2h%2h%2h\" parse \"%06h\" format b\n sum(aa-bb)^2\nend\n\non find_closest i n do\n g:patterns[i]\n r:first n\n each v in n\n  if color_dist[r g]>color_dist[v g] r:v end\n end\n patterns[i]:r\n (list r) drop n\nend\n\non click do\n n:16 limit (list \"%h\") parse \"\\n\" split p.text\n patterns[32]:16777215\n patterns[47]:0\n if (count n)>15\n  n:find_closest[32 n]\n  n:find_closest[47 n]\n end\n each c i in n patterns[33+i]:c end\nend","text":"Apply"},"p":{"type":"field","size":[125,62],"pos":[6,7],"scrollbar":1,"style":"code"}}}}}
(1 edit)

Nice! This helps a lot as you can do like duotones, tritones, sepiatone sets and such.
This is a deck global color set, correct? A card, or per canvas widget property would even more helpful.

Is there a way to hide my widget/contraption invisible as a group? That way the can appear on a card only when called for? 

Also this Decker objects format, that starts some Decker clipboard data such as "%%WDG ..." or whatever, it looks like base64 encoded binary data like a Data URL?  I want to be able to decode these into human viewable formats and then reencoded them when done.

"%%IMG2AIkAZAACAYUAAwEBDYUBAQABAQENhwE ...

Thanks!

There is one pattern set/palette per deck, but as demonstrated by the above materials it can be manipulated on the fly; it's a matter of scripting to give cards their own palette. Some of the submissions to the most recent Decker game jam, including (Don't) Save Me and I Lost My Duck take advantage of this.

There is no grouping mechanism for widgets upon a card other than Contraptions.

Decker's image encodings are described in The Decker File Format. It's also possible to use Lilt to programmatically manipulate decks, encode/decode various resource types and import/export a handful of conventional file types.