Moderators: Mug UK, lotek_style, Moderator Team
Total Eclipse wrote:There was a STOS extension purely for generating starfields. I think it was included on a ST Format coverdisk.
mlynn1974 wrote:There are some nice starfields in demos by The Lost Boys.
The maths isn't too difficult and can easily be implemented in STOS.
Code: Select all
10 curs off : click off : key off : hide : mode 0
20 STARS=100
30 ZDEPTH=256
40 dim X(STARS) : dim Y(STARS) : dim Z(STARS)
50 for N=1 to STARS
60 X(N)=rnd(319)-160
70 Y(N)=rnd(199)-100
80 Z(N)=1+rnd(ZDEPTH)
90 next N
100 logic=back
110 rem ** main loop
120 wash logic,0,0,320,200
130 for N=1 to STARS
140 Z(N)=Z(N)-4
150 if Z(N)<=1 then Z(N)=ZDEPTH
160 X=(X(N)*ZDEPTH)/Z(N)+160
170 Y=(Y(N)*ZDEPTH)/Z(N)+100
180 if X>=0 and X<=319 and Y>=0 and Y<=199 then dot logic,X,Y,1
190 next N
200 if hardkey=57 then goto 230
210 screen swap : wait vbl
220 goto 120
230 default : mouseon : end
Ahhhh, thanks! You know, that's how I'd have done it - surely demos must precalc the 3D projections?
mlynn1974 wrote:In The Misty Demos A Globe Called Alice was entirely precalculated and took up about 105kB.
I have the point data for the globe somewhere, but not the equations...
LynXX wrote:I fired up DCK on Hatari, what a blast from the past!! Last time I used this was probably 25 years ago on a real ST
LynXX wrote:Oh yeah, it doesn't run on low res. The weird thing is that with EmuTOS it just returns to the desktop without any error, whereas with a real TOS it does display a message about the resolution (in French, though!)
thomas3 wrote:mlynn1974 wrote:In The Misty Demos A Globe Called Alice was entirely precalculated and took up about 105kB.
I have the point data for the globe somewhere, but not the equations...
IIRC that was a pure STOS screen, wasn't it? I'm assuming the plot routine was doke-ing directly to screen memory?
Users browsing this forum: No registered users and 5 guests