PicoPicoGameEngine

Quick Links

Source Code

g=ppgraph
B=ppscreen:size()
Bw=B.width
Bh=B.height
rand=math.random
tex=pptex:load("main.png")

function obj()
local t
local x,y
x=rand(0,Bw-32)
y=rand(0,Bh-32)
t=pprect(x,y,32,32)
t.s=rand(1,4)/2
t.r=rand(0,360)
t.t=rand(2,4)
t.draw=function(s)
s.r=s.r+1
g:pivot(s+pppoint(16,16))
g:scale(t.s)
g:rotate(t.r)
g:put(s,s.t,tex)
g:rotate(0)
g:scale(1)
end
return t
end

o={}
for i=1,300 do
o[i]=obj()
end

function start()
 for i,v in ipairs(o) do
   v:draw()
 end
end