Compare commits

...

2 Commits

View File

@ -279,6 +279,9 @@ end
-->8 -->8
-- panel drawing -- panel drawing
-- empty panel placeholder
nopanel = {}
-- panel in ordinary state -- panel in ordinary state
panel = { panel = {
-- plt: palette as table -- plt: palette as table
@ -291,6 +294,7 @@ panel = {
-- negative == mid-fall -- negative == mid-fall
-- positive == bounce -- positive == bounce
-- frames left -- frames left
state="idle"
} }
mknew(panel) mknew(panel)
@ -310,6 +314,7 @@ prpblkp = {14,13,2,7}
newblock = { newblock = {
function() function()
return panel.new{ return panel.new{
id=1,
plt=redblkp, plt=redblkp,
sx=83,sy=1, sx=83,sy=1,
ey=2, as=0, ey=2, as=0,
@ -317,6 +322,7 @@ newblock = {
end, end,
function() function()
return panel.new{ return panel.new{
id=2,
plt=ylwblkp, plt=ylwblkp,
sx=83,sy=11, sx=83,sy=11,
ey=2,as=0, ey=2,as=0,
@ -324,6 +330,7 @@ newblock = {
end, end,
function() function()
return panel.new{ return panel.new{
id=3,
plt=grnblkp, plt=grnblkp,
sx=78,sy=11, sx=78,sy=11,
ey=2,as=0, ey=2,as=0,
@ -331,6 +338,7 @@ newblock = {
end, end,
function() function()
return panel.new{ return panel.new{
id=4,
plt=blublkp, plt=blublkp,
sx=83,sy=6, sx=83,sy=6,
ey=2,as=0, ey=2,as=0,
@ -338,6 +346,7 @@ newblock = {
end, end,
function() function()
return panel.new{ return panel.new{
id=5,
plt=prpblkp, plt=prpblkp,
sx=73,sy=11, sx=73,sy=11,
ey=2,as=0, ey=2,as=0,
@ -419,6 +428,42 @@ function ants:draw()
end end
end end
end end
-->8
-- gameplay logic
game={
incoming_frac = 0,
speed = 0,
gravity_lag = 30,
pop_lag = 20,
stop_frames = 0,
stop_max = 1,
life = 180,
life_max = 180,
}
mknew(game, function(ret)
local board = {}
for i=1,12 do
board[i] = {
nopanel, nopanel, nopanel, nopanel, nopanel, nopanel,
}
end
ret.board = board
ret.garbage_queue = {}
ret.garbage_source = source.new()
ret.floor_source = source.new()
end)
function game:update()
end
function game:draw()
end
__gfx__ __gfx__
0000000000111000011011000000000009999900066666000eeeee00077777000aaaaa0001111111000000000000000000000000000000000000000000000000 0000000000111000011011000000000009999900066666000eeeee00077777000aaaaa0001111111000000000000000000000000000000000000000000000000
00000000012221001221221000000000988888206bbbbb30eddddd207cccccd0a999994012222222300040400000000000000000000000000000000000000000 00000000012221001221221000000000988888206bbbbb30eddddd207cccccd0a999994012222222300040400000000000000000000000000000000000000000