Skip to main content

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

How about,

The "DVD ScreenSaver" contraption:


Gracefully sliding around the card of your choice forever! Includes a "bump" event fired every time it bounces off an edge of the screen. If you edit the prototype, you can make this use whatever image you like.

%%WGT0{"w":[{"name":"dvdScreenSaver1","type":"contraption","size":[101,58],"pos":[192,134],"show":"transparent","def":"dvdScreenSaver","widgets":{"vel":{"value":"[-3,-2]"}}}],"d":{"dvdScreenSaver":{"name":"dvdScreenSaver","size":[101,58],"margin":[0,0,0,0],"description":"just the dvd screen saver.","script":"on set_vel x do vel.text:\"%j\" format list x end\non get_vel do \"%j\" parse vel.text end\n\non view do\n v:get_vel[]\n p:v+card.pos\n s:(512,342)-card.size\n if !p[0]>0    v[0]:-v[0] b:1 end\n if !p[1]>0    v[1]:-v[1] b:1 end\n if  p[0]>s[0] v[0]:-v[0] b:1 end\n if  p[1]>s[1] v[1]:-v[1] b:1 end\n card.pos:(s-1)&0|p\n set_vel[v]\n if b card.event[\"bump\"] end\nend\n","template":"on bump do\n \nend","image":"%%IMG0AGUAOgB//////AAA////gAAAf/////wAAf////gAAP/////+AAP////+AAD//////gAH/////4AA//////4AB//////AAP//////AA//////4AAAAH///wAf+AAB/+AAAAAf//8AP/AAAH/wAf+AD///gH/n/gA/8AH/gA/+/4D/z/wAP/gB/wAH/v+A/8/8AB/4A/8AB/7/gf+P/AAf+AP/AAf+f8P/D/wAH/gD/wAP/n/H/g/4AD/wB/4AD/5/z/wf+AA/8Af+AB/8P+/4H/gAf/AH/gA//D//8B/4AP/gB/wA//gf/+Af8AP/wA/8A//wH//AP/AP/8AP/B//4B//wD/x//+AD////4AP/4A////+AA////8AD/8AP////AAP///4AA/+AH////AAH///gAAH/AB///+AAB//8AAAB/gAf//8AAAAAAAAAAfwAAAAAAAAAAAAAAAD4AAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAP/////+AAAAAAAAA//////////AAAAAA////////////8AAAD/////////////8AAH/////+AAf/////4AH/////AAAAP/////gD/////gAAAB/////4Af////+AAAA/////+AD/////4AAB//////AAP//////B///////AAAH////////////4AAAAD///////////AAAAAAAP////////AAdsAAAAAAf////AAAACVAAAAAAAAAAAAAAAAkQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwGBwP4Af+AHwAAAAAODgcD/gH/gH/AAAAADhwHAw8BwADg4AAAAAccBwMHgcABwHAAAAADOAcDA4H/AYAwAAAAA7AHAwOB/wGAMAAAAAHwBwMHgcABwHAAAAAB4AcDDwHAAODgAAAAAOAHA/4B/4B/wAAAAADABwP4Af+AHwAAAA=","attributes":{"name":[],"label":[],"type":[]},"widgets":{"vel":{"type":"field","size":[37,13],"pos":[2,-19],"locked":1,"animated":1,"show":"none","style":"plain","align":"center","value":"[3,2]"}}}}}
(+3)

ur a legend

Thank you. :)

(+2)

sorry, i think I must have missed something. how should I paste these into a deck?

(1 edit) (+3)

Copy the code starting at the "%%WGT" part and ending with the last "}" to your clipboard, open Decker, and then choose "Edit -> Paste Widgets" (or just "Edit -> Paste" in web-decker) from the main menu.

The code blocks on this page are what it looks like when you copy and paste one or more widgets in Decker. When you copy a Contraption to the clipboard, it carries along the associated Prototype (contraption definition), which makes it possible to share them like this or easily copy and paste them between decks. The same idea applies to copying and pasting cards.

Contraptions were added in v1.12, so if you downloaded an older version of Decker, please make sure you upgrade!

Does that clear things up?

(+1)

yes that absolutely does! thank you for being so thorough in your reply! i was also tripped up by needing to leave the widget tool for them to start doing their thing, but that one's on me

(1 edit) (+1)

A potentially more generally useful variant of the DVD ScreenSaver Contraption,

The Bouncer Contraption:



Same basic idea as its predecessor, but now you can paste a custom image into each instance, and that image will be bounced within the boundary of the contraption's (resizable) bounding box.

%%WGT0{"w":[{"name":"bouncer1","type":"contraption","size":[260,188],"pos":[126,68],"def":"bouncer","widgets":{"c":{"size":[101,58],"pos":[42,53]},"i":{"size":[100,32],"pos":[280,-6]},"p":{"size":[100,38],"pos":[280,45],"value":"{\"v\":[3,-2],\"p\":[42,53]}"}}}],"d":{"bouncer":{"name":"bouncer","size":[100,100],"resizable":1,"margin":[0,0,0,0],"description":"bounce an image around within a bounding rectangle","script":"on get_img     do i.value   end\non set_img x   do i.value:x end\non get_state   do p.text    end\non set_state x do p.text:x  end\n\non view do\n img:first extract arg where arg..type=\"image\" from i.value\n s:\"%j\" parse p.text\n b:card.size-img.size\n if !\"v\" in s  s.v:3,2 end\n if !\"p\" in s  s.p:b/2 end\n \n s.p:s.p+s.v\n if !s.p[0]>0    s.v[0]:-s.v[0] end\n if !s.p[1]>0    s.v[1]:-s.v[1] end\n if  s.p[0]>b[0] s.v[0]:-s.v[0] end\n if  s.p[1]>b[1] s.v[1]:-s.v[1] end\n s.p:(b-1)&0|s.p\n p.text:\"%j\" format s\n \n c.size:img.size\n c.pos:s.p\n c.clear[]\n c.paste[img 0,0 1]\nend\n","attributes":{"name":["img","state"],"label":["Image","State"],"type":["rich","string"]},"widgets":{"c":{"type":"canvas","size":[36,35],"pos":[120,53],"locked":1,"animated":1,"show":"transparent","border":0,"scale":1},"i":{"type":"field","size":[100,20],"pos":[120,-6],"show":"none","value":{"text":["","i"],"font":["",""],"arg":["","%%IMG0AGUAOgB//////AAA////gAAAf/////wAAf////gAAP/////+AAP////+AAD//////gAH/////4AA//////4AB//////AAP//////AA//////4AAAAH///wAf+AAB/+AAAAAf//8AP/AAAH/wAf+AD///gH/n/gA/8AH/gA/+/4D/z/wAP/gB/wAH/v+A/8/8AB/4A/8AB/7/gf+P/AAf+AP/AAf+f8P/D/wAH/gD/wAP/n/H/g/4AD/wB/4AD/5/z/wf+AA/8Af+AB/8P+/4H/gAf/AH/gA//D//8B/4AP/gB/wA//gf/+Af8AP/wA/8A//wH//AP/AP/8AP/B//4B//wD/x//+AD////4AP/4A////+AA////8AD/8AP////AAP///4AA/+AH////AAH///gAAH/AB///+AAB//8AAAB/gAf//8AAAAAAAAAAfwAAAAAAAAAAAAAAAD4AAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAP/////+AAAAAAAAA//////////AAAAAA////////////8AAAD/////////////8AAH/////+AAf/////4AH/////AAAAP/////gD/////gAAAB/////4Af////+AAAA/////+AD/////4AAB//////AAP//////B///////AAAH////////////4AAAAD///////////AAAAAAAP////////AAdsAAAAAAf////AAAACVAAAAAAAAAAAAAAAAkQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwGBwP4Af+AHwAAAAAODgcD/gH/gH/AAAAADhwHAw8BwADg4AAAAAccBwMHgcABwHAAAAADOAcDA4H/AYAwAAAAA7AHAwOB/wGAMAAAAAHwBwMHgcABwHAAAAAB4AcDDwHAAODgAAAAAOAHA/4B/4B/wAAAAADABwP4Af+AHwAAAA="]}},"p":{"type":"field","size":[100,20],"pos":[120,24],"show":"none","style":"plain"}}}}}