Log In  

-- generate tile
srand(0x1b0f)
for y=0,7 do
 for x=8,15 do
  local c=flr(x/2)+y
  if(x%2==0) c+=rnd(2)-1
  sset(x,y,c%4)
 end
end

-- set map tiles
for y=0,15 do
 for x=0,15 do
  mset(x,y,1)
 end
end

-- display map
local t=0
function _update()
 t+=1
end
function _draw()
 palt(0,false)
 for i=0,3 do
  pal(i,flr(t/4)%4==i and 12 or 1)
 end
 map(0,0, 0,0, 16,16)
end

Cart #41801 | 2017-06-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#41802 2017-06-20 08:23 ( Edited 2017-06-20 19:35)


[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2019-12-08 10:53 | 0.014s | 2097k | Q:21