I have no DB at the moment but I could rustle up a 2D example...
sunx= 320
suny= 240
spd= 4
sync on
rem -------------
rem Main Loop
rem -------------
Do
rem Store inputs
u= upkey()*spd : r=rightkey()*spd
d= downkey()*spd : l= leftkey()*spd
rem Move sun
sunx= sunx + r - l
suny= suny + d - u
Gosub render
sync
Loop
rem -------------
rem Gosubs
rem -------------
render:
rem Sun
ink rgb(255,220,0),0
for sy= 0 to 1
for r= 0 to 32
circle x,y+sy,r
next r
next sy
rem Check for sun in screen
If abs(320-sunx)<(320+32) and abs(240-suny)<(240+32)
rem Ring 1
ink rgb(100,120,255),0
circle 320+(320-x)/20,240+(240-y)/20,10
rem Ring 2
ink rgb(100,255,120),0
circle 320+(320-x)/5,240+(240-y)/5,20
rem Ring 3
ink rgb(255,100,150),0
circle 320+(320-x)/2,240+(240-y)/2,30
Endif
return
It is far better to complete a 10 line program than to start a 10,000 line program.
