Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
A jam submission

Falling PixelView game page

Submitted by tmpmachine7 (@tmpmachine) — 3 days, 7 hours before the deadline
Add to collection

Play game

Falling Pixel's itch.io page

How many characters of code did you use?
I counted 498

Include your code here, if you'd like to show it off!
<canvas id="can"></canvas>
<script>
can.width = 70
c = can.getContext('2d')
s=8
y=x=s
function draw() {
c.fillRect(x,y,s,s)
}
col=['green','cyan','blue','red']
j=0
A=D=false
function go() {
can.width = 70
c.fillStyle=col[j]
y++
x+=Math.random()*4
x-=Math.random()*4
D?x++:''
A?x-=1.5:''
draw()
act=0
y>150?y=-15:'';
if(x>70||x<-15){x=y=35;j++;A=D=false}
j=j%5
requestAnimationFrame(go)
}
go()
addEventListener('keydown',(e)=>{
D=e.key=='d'
A=e.key=='a'
})
</script>

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet