GameDev_TweetTweetJam10

TwisterClicks & DontClickBackground

For the Game Jam, "TweetTweetJam 10": https://itch.io/jam/tweettweetjam-10, I coded two clicker games in P5js that followed the under 500 code character limit In both games. The objective is to not click background, only the movingthe squares.

DontClickBackGround: https://illestpreacha.itch.io/dontclickbackground

TwisterClicks: https://illestpreacha.itch.io/twister-clicks

TwisterClicks Code: 431 Characters

setup=l=>{createCanvas(600,600),y=5,f=40,d=600,
e=random(100),s=0,fill("tan"),textSize(74)},
draw=o=>{background("black");
for(let o=0;o<=d;o+=1.5)for(let t=0;t<=d;t+=1.5)t%2==0?o%2==0?fill(y,e,200):fill(255):o%5==0?fill(d/5,e,'y):t%3==0?fill(d/3,2*e,f):fill(d/4,y,d/2),push(),rotate(PI*random(3,5)),l=o%random(3,16)*4,rect(o*f,t*f,f+4*l,4*l),pop();text(s,3*f,3*f)},mousePressed=e=>{c=get(mouseX,mouseY).join(),"0,0,0,255"!=c?s++:s-- }

DontClickBackGround Code: 306 Characters

setup=e=>{x=180,createCanvas(4*x,4*x),s=0,t=0},
draw=a=>{background("black"),fill("red"),d=x*sin(t)/2+180,e=x*cos(.2*t)+220,square(d,e,45),
fill("blue"),square(e,e,35),fill("tan"),square(e,d,45),textSize(24),text(s,3*x,3*x),t+=.1},
mousePressed=e=>{c=get(mouseX,mouseY).join(),print(c),"0,0,0,255"!=c?s++:s--}

ColorClicks Images

TwisterClicks Images

0
Subscribe to my newsletter

Read articles from Kofi / Illestpreacha directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kofi / Illestpreacha
Kofi / Illestpreacha