tweet sand

Add to
My games
Add to
Wishlist
Save to
Collection
No reviews
Exceptional
Meh
Skip

About

A small falling sand game in less then 560 characters of code.

Controls:

  • Scroll left and right with arrow keys
  • Z to place sand

This game was made for #TweetTweetJam 4. The rules of this jam are that the code must be able to fit within two tweets with no other assets other then the code.

Code:

i,g,h,w,a=0,30,60,btn,{}
for x=0,128 do
a[x] = {}
for y=0,128 do
a[x][y] = 0
end
end
function b()
cls(0)
for x=128,0,-1 do
for y=128,0,-1 do
if(a[x][y] == 1)then
if a[x][y+1] == 0 then
a[x][y] = 0 a[x][y+1] = 1
elseif a[x+1&127][y+1] == 0 then
a[x][y] = 0
a[x+1&127][y+1] = 1
elseif a[x-1&127][y+1] == 0 then
a[x][y] = 0
a[x-1&127][y+1] = 1
end
pset(x,y,10)
end end end end
function _update()
if(w(0))then g-=1&127 end
if(w(1))then g+=1&127 end
if(w(4))then a[g][h] = 1 end
if i==1 then b() i=0 end
i+=1
end

Platforms
Release date
Developer
end_sub
Age rating
Not rated

System requirements for Web

Read more...
tweet sand screenshot, image №2375988 - RAWG
Edit the game info
Last Modified: May 8, 2020

Where to buy

itch.io