STARFIELD CONFIG made by ZUF

Pixilang по русски
Post Reply
goglus
Posts: 122
Joined: Tue Dec 04, 2007 4:19 pm
Contact:

STARFIELD CONFIG made by ZUF

Post by goglus » Fri Dec 21, 2007 9:49 am

только звезды из проги автора ZUF

///// STARFIELD CONFIG /////
frame_speed = 1 // ms Между кадрами
speed = 2 // скорость полета сквозь звезды (рекомендуемое значение = 1)
line_lengs=17 // Длина линии (размазанная звезда)
stars_count = 3000
max_brightness = 235 // Максимальная яркость звезды
word_display_time=6000 // in ms
//////////////////
str_show_time=0
rand_seed(get_seconds)
px = new_array (stars_count)
py = new_array (stars_count)
pz = new_array (stars_count)

i=0
init:
if (i<stars_count)
{new_star
pz = (rand)/64
if (pz<=0) {pz=1}}
if (i>=stars_count)
{i=0
start_timer(1)
clear(0)
go main}
i=i+1
go init

main:
begin_cycle:
if (pz=0)
{}
x = px/pz
y = py/pz
z = (pz+line_lengs)
if (z=0){z=1}
xl = px/z
yl = py[i]/z

color_t = max_brightness-pz[i]
color = get_color( color_t, color_t, color_t )
line (x,y,xl,yl,color )

pz[i] = pz[i] - speed
if (pz[i] < speed*4)
{new_star}

i = i + 1
if (i>(stars_count-line_lengs-1))
{i=0
clear(0)
}
if (i<(stars_count-line_lengs-1))
{go begin_cycle}

get_str_num:
t = get_timer(1)
ystr = get_string_size(str_num)/(-2)*8
ystr2 = ystr+1
transp (256)
frame(frame_speed)
transp (128)
go main

new_star:
px[i] = (32768/2-rand)*4
py[i] = (32768/2-rand)*3
pz[i] = max_brightness
ret

Post Reply