That’s nice, @TokOut but my game will not have a sun nor day. It’ takes place in an apocalypse!
The end should be the morning
@TokOut Here an eclipse program I had.
displayMode(FULLSCREEN)
function setup()
x=WIDTH/2-200
y=HEIGHT/2-200
r=84 g=148 b=170 v=.05
tab={}
for z=1,1000 do
xx=math.random(180)
yy=math.random(math.floor(math.sqrt(180*180-xx*xx))+1)
if math.random(2)==1 then xx=-xx end
if math.random(2)==1 then yy=-yy end
table.insert(tab,vec3(xx,yy,math.random(60)))
end
end
function draw()
background(r,g,b)
if x>WIDTH/2-30 and x<WIDTH/2+30 then
vv=math.abs(WIDTH/2-x)
for a,b in pairs(tab) do
fill(255,255,255,(30-vv)/6)
ellipse(WIDTH/2+b.x,HEIGHT/2+b.y,b.z)
end
end
fill(255, 230, 0, 255)
ellipse(WIDTH/2,HEIGHT/2,200)
fill(r,g,b)
ellipse(x,y,200)
x=x+.1 y=y+.1
if x>WIDTH/2-200 and r<85 then r=r-v g=g-v b=b-v end
if x>WIDTH/2 then v=-.05 end
end
@TokOut I love your idea of having the sun come up when the game is over! I’ll add that in when I finish the game.
Okay.