Hi there
"Shimmering star sprangled sky"
I'm not applying for a medal on this one, but maybe someone could use this effect to their advantage.
To look at it as I have intended set the resolution in the setup file to the same as the virtual resolution. (800,600)
This effect will work in different scenarios but you have to experiment. I think the slowest one is the most realistic.
The important thing:I don't think this method is too costly on the fps.
SetVirtualresolution(800,600)
Global factor=2
CreateStarfield()
setprintsize(16)
Do
if getrawkeypressed(38) then inc factor
if getrawkeypressed(40) then dec factor
if getrawkeypressed(49)
for i=2 to 4
setimagemagfilter(i,0)
next
endif
if getrawkeypressed(50)
for i=2 to 4
setimagemagfilter(i,1)
next
endif
setSpriteangle(2,GetSpriteAngle(2)+(0.001*factor))
setSpriteangle(3,GetSpriteAngle(3)+(0.002*factor))
setSpriteangle(4,GetSpriteAngle(4)+(0.004*factor))
print("press up/down arrow to increase/decrease rotation speed")
print("Rotation multiplication factor = "+ str(factor))
print("Press 1/2 to turn off/on setImagefilter")
sync()
loop
Function CreateStarField
CreateSprite(1,0)
setSpriteSize(1,1,1)
For Starfield=2 to 4
For Stardot=1 to 1000
x=random(1,800)
y=random(1,600)
setSpriteposition(1,x,y)
drawsprite(1)
next
getImage(Starfield,0,0,800,600)
setimageMagfilter(Starfield,1)
setimageMinfilter(Starfield,1)
setImageTransparentColor(Starfield,0,0,0)
createSprite(Starfield,Starfield)
setSpriteOffset(Starfield,400,300)
setSpriteAngle(StarField,45*Starfield-2)
setSpritePositionbyoffset(Starfield,GetVirtualwidth()/2,getVirtualheight()/2)
setSpriteDepth(Starfield,10000)
clearscreen
next
setSpriteSize(2,1000,800)
setSpriteSize(3,1200,1000)
setSpriteSize(4,2400,2000)
endFunction
EDIT: added paranthesis for compatibility
I never want what I know.