Been working on my game for awhile now, just thought I'd share an example of my orbiting menu. It looks better if you replace the image with a round one.
xres=1024:yres=(xres/3)*2
plantesx#=xres/2
planetsy#=yres/2
SetVirtualResolution ( xres, yres )
Type _object
image
sprite
x#
y#
angle#
width
height
visible
plnt
scale#
red
blue
green
EndType
dim popups[20] as _object
dim planets[5] as _object
for t = 1 to 20
`popups[t].image = LoadImage ( "anibigs"+str(t)+".png" )
`popups[t].sprite = CreateSprite( popups[t].image )
popups[t].sprite = CreateSprite( 0 )
popups[t].width=100
popups[t].height=100
popups[t].x#=t*(popups[t].width-55)
popups[t].y#=600
popups[t].angle#=72* t
setspritepositionbyoffset(popups[t].sprite,popups[t].x#, popups[t].y#)
setspritesize(popups[t].sprite ,popups[t].width,popups[t].height )
next t
for t=1 to 5
popups[t].plnt=1
next t
for t=6 to 10
popups[t].plnt=2
next t
for t=11 to 15
popups[t].plnt=3
next t
for t=16 to 20
popups[t].plnt=4
next t
for t = 1 to 5
` planets[t].image = LoadImage ( "anibigs"+str(t)+".png" )
` planets[t].sprite = CreateSprite( planets[t].image )
planets[t].sprite = CreateSprite( 0 )
planets[t].width=200
planets[t].height=200
planets[t].x#=t*(planets[t].width-55)
planets[t].y#=400
planets[t].angle#=90* t
setspritepositionbyoffset(planets[t].sprite,planets[t].x#, planets[t].y#)
setspritesize(planets[t].sprite ,planets[t].width,planets[t].height )
setspritedepth(planets[t].sprite ,50)
next t
`Place the sun
for t=5 to 5
planets[t].x#=xres/2
planets[t].y#=yres/2
planets[t].scale#=2
setspritepositionbyoffset(planets[t].sprite,planets[t].x#, planets[t].y#)
setspritesize(planets[t].sprite ,planets[t].width*planets[t].scale#,planets[t].height*planets[t].scale# )
setspritedepth(planets[t].sprite ,50)
next t
gosub coloursprites
do
gosub dimplanets
gosub rotates
Sync()
loop
rotates:
for t=1 to 4
if getrawmousex()< xres/2-150 then planets[t].angle#=WrapValue(planets[t].angle#-.5)
if getrawmousex()> xres/2+150 then planets[t].angle#=WrapValue(planets[t].angle#+.5)
planets[t].x# = (sin(planets[t].angle#)*400)+planets[5].x#
planets[t].y# = planets[5].y#-((cos(planets[t].angle#)*350)/3)
planets[t].scale#=scaleangleWrap( planets[t].angle# )
setspritepositionbyoffset (planets[t].sprite,(planets[t].x#),(planets[t].y#))
setspritedepth(planets[t].sprite ,100-(planets[t].scale#)*100)
setspritesize(planets[t].sprite ,(planets[t].width*planets[t].scale#)+50,(planets[t].height*planets[t].scale#)+50 )
next t
for t=1 to 20
popups[t].angle#=WrapValue(popups[t].angle#-.5)
popups[t].x# = (sin(popups[t].angle#)*(900*planets[popups[t].plnt].scale#))
popups[t].y# = (cos(popups[t].angle#)*(350*planets[popups[t].plnt].scale#))
popups[t].scale#=(scaleangleWrap( popups[t].angle# ))*planets[popups[t].plnt].scale#
setspritepositionbyoffset (popups[t].sprite,planets[popups[t].plnt].x#+(popups[t].x#/4),planets[popups[t].plnt].y#-(popups[t].y#/12))
setspritedepth(popups[t].sprite ,(getspritedepth( planets[popups[t].plnt].sprite)+(5-(scaleangleWrap( popups[t].angle# )*10))))
setspritesize(popups[t].sprite ,popups[t].width*(popups[t].scale#),popups[t].height*(popups[t].scale#) )
next t
return
Function WrapValue( Angle# )
If Angle# < 0.0 then Angle# = 360.0 + Angle#
If Angle# > 360.0 then Angle# = Angle# - 360.0
Endfunction Angle#
`Scale Based on Angle
Function scaleangleWrap( pAngle# )
if pAngle# > 180 then pAngle# = pAngle#+((180 - pAngle#)*2)
pAngle# = pAngle#/180
Endfunction pAngle#
`Set Planets Darkness
dimplanets:
for t = 1 to 20
setspritecolorblue(popups[t].sprite,popups[t].blue*popups[t].scale#)
setspritecolorred(popups[t].sprite,popups[t].red*popups[t].scale#)
setspritecolorgreen(popups[t].sprite,popups[t].green*popups[t].scale#)
next t
for t = 1 to 5
setspritecolorblue(planets[t].sprite,planets[t].blue*planets[t].scale#)
setspritecolorred(planets[t].sprite,planets[t].red*planets[t].scale#)
setspritecolorgreen(planets[t].sprite,planets[t].green*planets[t].scale#)
next t
return
coloursprites:
for t = 1 to 20
popups[t].red=random(50,200)
popups[t].blue=random(50,200)
popups[t].green=random(50,200)
setspritecolorblue(popups[t].sprite,popups[t].blue)
setspritecolorred(popups[t].sprite,popups[t].red)
setspritecolorgreen(popups[t].sprite,popups[t].green)
next t
for t = 1 to 5
planets[t].red=random(50,200)
planets[t].blue=random(50,200)
planets[t].green=random(50,200)
setspritecolorblue(planets[t].sprite,planets[t].blue)
setspritecolorred(planets[t].sprite,planets[t].red)
setspritecolorgreen(planets[t].sprite,planets[t].green)
next t
return
What mine looks like right now, still alot more to do.
yo