And once again.
--'by Peter Wirbelauer
openwindow(640,480,0,"Retro-Stars")
setframetimer(60)
function rand(minZahl,maxZahl)
maxZahl = (maxZahl-minZahl)
return int(rnd()*maxZahl+minZahl)
end
local rad = math.rad
local z = "HELLO AND WELCOME IN THE SUPER PROGRAMMING!"; letter=0
local fok, xp, yp, i, tl, x, m = 160,0,0,0,0,0,0
local x3DSterne ={}
local y3DSterne ={}
local z3DSterne ={}
local y ={}
local angle ={}
tl = len(z)
m=loadmusic("music/b.mod")
playmusic(m,128,-1)
for i=0,tl do
angle[i] = 360-i*(360/tl)
y[i] = 240
end
for i=0,799 do
x3DSterne[i] = rand (1,440)
y3DSterne[i] = rand (1,380)
z3DSterne[i] = rand (1,500)
end
repeat
k=getkey()
alphachannel(150)
cls()
for i=0,799 do
xp = (x3DSterne[i] * fok) / (z3DSterne[i] + fok) + 5
yp = (y3DSterne[i] * fok) / (z3DSterne[i] + fok) + 5
color(255,255,255)
box(xp,yp, 2+xp,2+yp)
xp = (-x3DSterne[i] * fok) / (z3DSterne[i] + fok) + 630
yp = (-y3DSterne[i] * fok) / (z3DSterne[i] + fok) + 470
box(xp,yp,2+xp,2+yp)
xp = (-x3DSterne[i] * fok) / (z3DSterne[i] + fok) + 630
yp = ( y3DSterne[i] * fok) / (z3DSterne[i] + fok) + 8
box(xp,yp,2+xp,2+yp)
xp = ( x3DSterne[i] * fok) / (z3DSterne[i] + fok) + 5
yp = (-y3DSterne[i] * fok) / (z3DSterne[i] + fok) + 470
box(xp,yp,2+xp,2+yp)
z3DSterne[i] = z3DSterne[i] -1
if z3DSterne[i] <=0 then
z3DSterne[i] = 500
end
end
alphachannel(255)
for x=1,tl do
angle[x] = angle[x] +1
if angle[x] == 360 then angle[x] =0; end
letter = mid(z, x ,1)
y[x] = y[x] + sin(rad(angle[x]*4))
color(0x9C,0x5A,0xEF)
drawtext(2+x*14,y[x],letter)
y[x] = y[x] + cos(rad(angle[x]*2))
color(0,255,0)
drawtext(2+x*14,5+y[x],letter)
end
redraw()
until k==27
closewindow()