erste programme
This commit is contained in:
63
cards/frame.p8
Normal file
63
cards/frame.p8
Normal file
@@ -0,0 +1,63 @@
|
||||
pico-8 cartridge // http://www.pico-8.com
|
||||
version 43
|
||||
__lua__
|
||||
-- game main loop
|
||||
|
||||
game_state={
|
||||
state = 1 -- 1: title 2: game 3: over
|
||||
}
|
||||
|
||||
function _init()
|
||||
end
|
||||
|
||||
function _update()
|
||||
|
||||
-- update game_objects
|
||||
for object in all(game_objects) do
|
||||
object:update()
|
||||
end
|
||||
end
|
||||
|
||||
function _draw()
|
||||
|
||||
-- draw game_objects
|
||||
for object in all(game_objects) do
|
||||
object:draw()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-->8
|
||||
-- game objects
|
||||
|
||||
game_objects={}
|
||||
|
||||
|
||||
|
||||
--[[ template:
|
||||
function make_object(_x,_y)
|
||||
|
||||
local object={
|
||||
x=_x,
|
||||
y=_y
|
||||
}
|
||||
|
||||
function object:update()
|
||||
end
|
||||
|
||||
function object:draw()
|
||||
spr(1,x,y)
|
||||
end
|
||||
|
||||
add(game_objects, object)
|
||||
return object
|
||||
end
|
||||
--]]
|
||||
|
||||
__gfx__
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
Reference in New Issue
Block a user