
-----------------------------------
gamer
Wed Apr 14, 2004 9:09 pm

starfield/space screensaver
-----------------------------------
ok if u rightclick desktop n go select the starfield screensaver, n yea this is the one i wish to make. but problem is, i hav no idea as to how to start, can anyone please guide me some steps to make this...if u want u can post the codes , but i would kinda prefer you just teachin me the steps to getting this screensaver

thankyou for ya time

-----------------------------------
Paul
Wed Apr 14, 2004 9:43 pm


-----------------------------------
maybe this would help u, I found it using search
http://www.compsci.ca/v2/viewtopic.php?t=2760&highlight=star

-----------------------------------
gamer
Wed Apr 14, 2004 9:56 pm


-----------------------------------
thnx paul bian for the link but however their program only hav stars just simply goin across the screen....which is just way too simple n not wut i wanted

wut i wish to make is kinda like imagining urself travelling through the space, like keep zooming in (if u wanna kno wut i reli mean just select "startfield" at the screensaver setup)

i just dun understand how to make that kind of "zooming" from small to big thingy

if anyone knows plz share....thnx

-----------------------------------
gamer
Thu Apr 15, 2004 3:14 pm


-----------------------------------
can ANYONE plz help me?? u guys dont hav ta gimme the exact codes (but if u hav them plz do), all i need is just steps as to how i can get to makin it...pleassse

-----------------------------------
recneps
Thu Apr 15, 2004 3:16 pm


-----------------------------------
well you could have the dots bein drawn near the middle and out towards the edge.. and then they would move down the screen and to the outside of screen... i think thats how it works

-----------------------------------
gamer
Thu Apr 15, 2004 4:16 pm


-----------------------------------
ok sry maybe im just dumb but i reli confused n stuff

i guess i reli need some codes

if anyone is nice enough to kinda make it plzz do (like just the beginnin or sumthin)

-----------------------------------
AsianSensation
Thu Apr 15, 2004 6:46 pm


-----------------------------------
View.Set ("offscreenonly")
colorback (7)
cls

type StarType :
    record
        X, Y, Size, Vx, Vy : real
    end record

var Stars : array 1 .. 100 of StarType

for rep : 1 .. 100
    Stars (rep).X := maxx div 2
    Stars (rep).Y := maxy div 2
    Stars (rep).Size := 1
    if Rand.Int (0, 1) = 0 then
        Stars (rep).Vx := Rand.Real * 3
    else
        Stars (rep).Vx := Rand.Real * 3 * -1
    end if
    if Rand.Int (0, 1) = 0 then
        Stars (rep).Vy := Rand.Real * 3
    else
        Stars (rep).Vy := Rand.Real * 3 * -1
    end if
end for

loop
    for rep : 1 .. 100
        drawfilloval (round (Stars (rep).X), round (Stars (rep).Y), round (Stars (rep).Size), round (Stars (rep).Size), white)
    end for
    View.Update
    cls
    for rep : 1 .. 100
        Stars (rep).X += Stars (rep).Vx
        Stars (rep).Y += Stars (rep).Vy
        Stars (rep).Size := abs (Stars (rep).X - maxx div 2) / 100
        if Stars (rep).X < 0 or Stars (rep).X > maxx or Stars (rep).Y < 0 or Stars (rep).Y > maxy then
            Stars (rep).X := maxx div 2
            Stars (rep).Y := maxy div 2
            Stars (rep).Size := 1
        end if
    end for
end loop

it's not that good, but I have a compsci and guitar test tomorrow, so I couldn't spend too much time on it. But this is basicly what you could do.

-----------------------------------
gamer
Thu Apr 15, 2004 6:57 pm


-----------------------------------
wow man thnx alot, however.......
damn im still a newb n i hardly kno any of the codes  :cry: 
is it possible to make it with simplier codes??
or if u hav time, can ya kinda explain them??plzzz

-----------------------------------
AsianSensation
Thu Apr 15, 2004 7:15 pm


-----------------------------------
basicly, I created a star "object", where it has it's position and speed. Read up on records first. 

I increase the x and y coordinate of a star by their speed, then I change the size accoding to the x coord. It gets bigger as it gets near the edge of the screen.

Then draw everything, View.Update it.

-----------------------------------
gamer
Thu Apr 15, 2004 8:06 pm


-----------------------------------
thnx alot

-----------------------------------
gamer
Thu Apr 15, 2004 8:56 pm


-----------------------------------
but wut exactly are type n record for?? is it posible if i use somethin else instead?? also, wuts withe the (rep) thing?? lol cuz ive never seen the command "Stars (rep).X"
maybe im just too dumb for this

btw how come it seems theres this black rectangle with a dot in the middle??
