Hey michael, I like your demo, its cool
bitmap font scroller is good, I used the text commands for the sine scroller so maybe thats why the FPS dropped but should still be able to get a sine scroller working with it.
Nice copper style effect under the logo and I really like the wavy logo, very retro and
Cheers and well done
Don't forget to put your code on here too for all to see, warts and all so we can all learn from it.
I still haven't finished mine yet but the code and media are here
Not sure if anyone will learn anything form it lol and it is not commented or optimised yet, just quick scruffy coding. I didn't even get round to doing the wrapper for the sine scroller text yet, made it 90 characters long to scroll so the sine wave matches up.
Will optimise everything when get it complete and then comment it, code scruffy when doing something like this as it's just fun and wanting to get something up and viewable quick
Copper effects probably done similar to yours and the tunnel is so easy it's unbelievable lol just a series of images in an animation loop, lots of Amiga demos used tricks like this for speed. Still get 60 FPS plus out of it all and on the iPhone too
// Project: Zirus
// Created: Spectre
global screenWidth = 800
global screenHeight = 600
SetSyncRate(60,0)
SetWindowTitle( "ZiRuS - 1" )
SetWindowSize( screenWidth, screenHeight, 0 )
SetVirtualResolution( screenWidth, screenHeight )
SetSyncRate(60,1)
/*
l = 0
while l = 0
if GetRawKeyPressed(27)
l = 1
endif
sync()
endwhile
*/
titleMusic = LoadMusic("/media/rscebit90.mp3")
SetMusicFileVolume( titleMusic, 100 )
PlayMusic( titleMusic, 0 )
ResetTimer()
zlImage = LoadImage("ziruslogo1.png")
zlSpr = CreateSprite( zlImage )
SetSpriteSize(zlSpr, screenWidth+10, 100)
SetSpritePosition(zlSpr, screenWidth, 0)
SetSpriteDepth(zlSpr, 0)
line1 = CreateSprite(0)
SetSpritePosition(line1,0,GetSpriteHeight(zlSpr))
SetSpriteSize(line1, screenWidth,2)
SetSpriteColor(line1, 200, 200, 200, 0)
SetSpriteDepth(line1, 1)
spImage = LoadImage("spectrelogo.png")
spSpr = CreateSprite( spImage )
//SetSpriteSize(spSpr, screenWidth+10, 100)
//SetSpritePosition(spSpr, 200, 0 - GetSpriteHeight( spSpr ))
SetSpritePosition(spSpr, screenWidth, screenHeight - GetSpriteHeight( spSpr ))
SetSpriteDepth(spSpr, 2)
line2 = CloneSprite(line1)
SetSpritePosition(line2,0,screenHeight - GetSpriteHeight(spSpr))
SetSpriteDepth(line1, 2)
box = CloneSprite(line1)
SetSpritePosition(box,0,screenHeight - GetSpriteHeight(spSpr))
SetSpriteSize(box, screenWidth, GetSpriteHeight(spSpr))
SetSpriteColor(box, 0, 40, 20, 0)
SetSpriteDepth(box, 3)
spriteOn( zlSpr, 0, 1)
for i = 0 to 255 step 3
SetSpriteColor(line1, 200, 200, 200, i)
SetSpriteColor(line2, 200, 200, 200, i)
SetSpriteColor(box, 0, 40, 20, i)
Sync()
next i
//wait (3)
spriteOn( spSpr, 200, 1)
wait (9.482)
global snakeImage
snakeImage=LoadImage("car.png")
global snakehead
snakehead = LoadImage("snakehead.png")
startNum=1
global num=150
s=40
event=1
countDown = 0
alpha = 0
sAlpha = 0
dim snakeSpr[num]
for i = 1 to num
snake(i,s)
next i
do
if event = 1
w#=w#+90.0/60.0
if w#> 360.0 then w#=w#-360.0
z#=z#+110.0/60.0
if z#> 360.0 then z#=z#-360.0
if alpha = 0 then sAlpha=sAlpha+2
for i=startNum to num
spr=snakeSpr[i]
if alpha = 0
if sAlpha > 255 then alpha = 1
if sAlpha < 256 then SetSpriteColorAlpha(spr, sAlpha)
endif
SetSpritePositionByOffset(spr, 400.0+sin(z#+i*2.0)*300.0, 310.0+sin(w#+i*5)*150.0)
next
if timer() > 25 then countDown = 1 //************** change timer back to 25 after skip part *********************************
if countDown = 1
DeleteSprite( snakeSpr[startNum] )
startNum = startNum + 1
if startNum = num
DeleteSprite( snakeSpr[startNum] )
DeleteImage ( snakeImage )
DeleteImage ( snakehead )
countDown = 0
trigger = 0
event = 2
endif
endif
elseif event = 2
if trigger = 0
spriteOff( spSpr, GetSpriteX(spSpr))
DeleteSprite(spSpr)
DeleteImage(spImage)
for i = GetSpriteY(line2) to screenHeight-20
SetSpritePosition(line2, 0, i)
SetSpritePosition(box, 0, i)
Sync()
next i
//**************************************************************************************************
// Take the 2 lines out to get back tunnel parts after testing
//event = 4
//goto skippoint:
//**************************************************************************************************
tunnelImage = LoadImage("tunnel1.png")
spTun = CreateSprite( tunnelImage )
createTunnel(spTun)
trigger = 1
spin = 0
xM = 200.0
yM = 150.0
spinAng# = 0.0
alpha = 0
sAlpha = 0
endif
w#=w#+90.0/60.0
if w#> 360.0 then w#=w#-360.0
z#=z#+110.0/60.0
if z#> 360.0 then z#=z#-360.0
if alpha = 0 then sAlpha=sAlpha+2
if alpha = 0
if sAlpha > 255 then alpha = 1
if sAlpha < 256 then SetSpriteColorAlpha(spTun, sAlpha)
endif
if spin = 0
SetSpritePositionByOffset(spTun, 400.0+sin(z#+1*2.0)*xM, 310.0+sin(w#+1*5)*yM)
if timer() > 35
PlaySprite( spTun, 50 )
spin = 1
endif
elseif spin = 1
if xM > 50.0 then xM = xM - 1.0
if yM > 100.0 then yM = yM - 1.0
SetSpritePositionByOffset(spTun, 400.0+sin(z#+1*2.0)*xM, 310.0+sin(w#+1*5)*yM)
if xM < 51.0
if timer() < 45
//SetSpriteAngle(spTun, spinAng#)
spinAng# = spinAng# + 1.0
if spinAng# > 360 then spinAng# = 0.0
elseif timer() > 45
//SetSpriteAngle(spTun, spinAng#)
spinAng# = spinAng# + 1.0
if spinAng# > 360 then spinAng# = 0.0
if spinAng# > 20 and spinAng# < 22
spinAng# = spinAng# - 1
trigger = 2
endif
if trigger = 2
if xM > 0.0 then xM = xM - 1.0
if yM > 0.0 then yM = yM - 1.0
if xM <= 0.0 and yM <= 0.0
event = 3
trigger = 0
countDown = 0
spin = 0
alpha = 0
sAlpha = 255
endif
endif
endif
SetSpriteAngle(spTun, spinAng#)
endif
endif
elseif event = 3
if trigger = 0
#constant ballnum = 8
dim ballSpr[ballnum]
Type ballType
sc# as float
bh as integer
b# as float
ypos# as integer
bsp# as float
xpos# as float
speed# as float
Endtype
global ball as ballType[ballnum]
ballImage=LoadImage("ball.png")
for i = 1 to ballnum
ball[i].sc#=0.08
ball[i].bh=40
ball[i].b#=180
ball[i].ypos#=300.0
ball[i].bsp#=20
ball[i].xpos#= Random2(-30, 30)
if ball[i].xpos# >= -30 and ball[i].xpos# < -20
ball[i].speed# = 3
elseif ball[i].xpos# >= -20 and ball[i].xpos# < -10
ball[i].speed# = 2
elseif ball[i].xpos# >= -10 and ball[i].xpos# < 0
ball[i].speed# = 1
elseif ball[i].xpos# > 0 and ball[i].xpos# < 10
ball[i].speed# = 1
elseif ball[i].xpos# >= 10 and ball[i].xpos# < 20
ball[i].speed# = 2
elseif ball[i].xpos# >= 20 and ball[i].xpos# <= 30
ball[i].speed# = 3
elseif ball[i].xpos# >= 0
ball[i].speed# = 0
endif
ballSpr[i]=CreateSprite(ballImage)
SetSpriteOffset(ballSpr[i], GetSpriteWidth(ballSpr[i])/2, GetSpriteHeight(ballSpr[i])/2)
SetSpritePositionByOffset(ballSpr[i], (screenWidth/2)+ball[i].xpos#, screenHeight/2)
SetSpriteScaleByOffset(ballSpr[i], ball[i].sc#, ball[i].sc#)
SetSpriteColorAlpha(ballSpr[i], 50)
SetSpriteVisible(ballSpr[i],0)
next i
trigger = 1
elseif trigger = 1
balltimer=1
startover:
ResetTimer()
t#=Timer()
again:
if balltimer > ballnum
trigger = 2
goto out
endif
for i = 1 to balltimer
SetSpriteVisible(ballSpr[i],1)
gosub amigaBall
next i
if Timer()-t# > 0.5
balltimer=balltimer+1
Sync()
goto startover
endif
sync()
goto again
out:
ResetTimer()
elseif trigger = 2
for i = 1 to ballnum
gosub amigaBall
if alpha = 1
SetSpriteColorAlpha(ballSpr[i],sAlpha)
SetSpriteColorAlpha(spTun,sAlpha)
endif
next i
if timer() > 10
alpha = 1
sAlpha = sAlpha - 3
if sAlpha < 0
event = 4
trigger = 0
sAlpha = 0
alpha = 0
t# = 0
DeleteSprite(spTun)
DeleteImage(tunnelImage)
for i = 1 to ballnum
DeleteSprite(ballSpr[i])
next i
DeleteImage(ballImage)
endif
endif
endif
elseif event = 4
skippoint: // Put this to any point to skip sections and change event number
/*
if timer() > 25 then countDown = 1 //************** change timer back to 25 after skip part *********************************
if countDown = 1
DeleteSprite( snakeSpr[startNum] )
startNum = startNum + 1
if startNum = num
DeleteSprite( snakeSpr[startNum] )
DeleteImage ( snakeImage )
DeleteImage ( snakehead )
countDown = 0
trigger = 0
event = 2
endif
endif
*/
if trigger = 0
/*
l = 0
while l = 0
if GetRawKeyPressed(27)
l = 1
endif
sync()
endwhile
*/
ResetTimer()
wait(2)
text$="Zirus Mega Demo! by SpecTre - Welcome to this MEGA DEMO, hope you are enjoying the show so far "
text$=text$ + "but no Amiga retro style demo would be complete without the Sine Scroller!! .......... "
text$=text$ + "This is a little boring though don't you think? ......... Let's spice it up a little :) .... * "
text$=text$ + "How about a nice green colour? ..... No! .... Hmmmm ................................. "
text$=text$ + "Well so far we have had a snake like dragon using 150 silky smooth sprites and a retro style tunnel "
text$=text$ + "with the Amiga ball bouncing down it! ..... Have you worked out what the music is yet? ..... Well it's from "
text$=text$ + "the awesome - Red Sector - CeBIT 90 - Amiga Demo ..... by for now and ---- "
text$=text$ + " HAPPY CODING!!!!!! -- AGK DEMO SCENE ---- AGK DEMO SCENE ---- AGK DEMO SCENE -- "
text$=text$ + " ......................................................................"
text$=text$ + " %"
text$=text$ + "&"
text2$="Well can you read 2 sine scrollers at the same time? .......... Lets see how we go with this then! .... "
text2$=text2$ + "Still not happy! :( ... How about some copper style bars? .................................................^ "
text2$=text2$ + "Hope it is getting a bit more interesting now :D ..... This demo has been brought to you by SpecTre and "
text2$=text2$ + "you will know that this is the first retro style demo of the new -- AGK DEMO SCENE -- which you will find "
text2$=text2$ + "on The Game Creator forums! So get coding, make one of your own and let's make the -- AGK DEMO SCENE -- a "
text2$=text2$ + "great place to showcase some of your stuff! ........ -- AGK DEMO SCENE ---- AGK DEMO SCENE ---- AGK DEMO SCENE -- "
text2$=text2$ + "....................................................................."
text2$=text2$ + "."
text2$=text2$ + "."
text2$=text2$ + "."
text2$=text2$ + "."
text2$=text2$ + "&"
#constant textNum = 90 // 33 characters long for the screen + 1 off screen for scroll
wrap = 57
tSize = 50
speed# = 250
height = 220
dim textX[textNum]
xSpeed = 3
textPos = 0
speed2# = 200
height2 = 120
dim textX2[textNum]
xSpeed2 = 5
textPos2 = 0
copSpeed# = 60
copSpeed2# = 40
copHeight = 380
copOn = 0
copImage=LoadImage("copper.png")
//startNum=1
#constant copNum=90
copSizeX=screenHeight
copSizeY=40
//countDown = 0
alpha = 0
sAlpha = 0
scrollOff = 0
startNum = 1
dim copSpr[copNum]
dim copSpr2[copNum]
for i = 1 to copNum
cSpr=createsprite(copImage)
SetSpriteSize(cSpr,copSizeX,copSizeY)
SetSpriteOffset(cSpr, GetSpriteWidth(cSpr/2), GetSpriteHeight(cSpr/2))
SetSpriteAngle(cSpr, 90)
SetSpriteColor(cSpr, i, i, 255, 0)
copSpr[i]=cSpr
cSpr2=createsprite(copImage)
SetSpriteSize(cSpr2,copSizeX,copSizeY)
SetSpriteOffset(cSpr2, GetSpriteWidth(cSpr2/2), GetSpriteHeight(cSpr2/2))
SetSpriteAngle(cSpr2, 90)
SetSpriteColor(cSpr2, 255, i, 90, 0)
copSpr2[i]=cSpr2
next i
For i=1 to textNum
textPos = textPos + 1
CreateText(i,Mid(text$,textPos,1))
SetTextSize(i,tSize)
textX[i] = ((i*tSize/2) - tSize/2) + screenWidth
SetTextPosition(i,textX[i], 0)
textPos2 = textPos2 + 1
CreateText(i+textNum,Mid(text2$,textPos2,1))
SetTextSize(i+textNum,tSize)
textX2[i] = ((i*tSize/2) - tSize/2) + (screenWidth + ((tSize/2)*wrap)) * 3
SetTextPosition(i+textNum,textX2[i], 0)
SetTextColor(i+textNum, 255, 255, 0, 255)
Next i
trigger = 1
endif
if alpha = 0 then sAlpha = sAlpha + 5
For i=1 to textNum
cSpr=copSpr[i]
cSpr2=copSpr2[i]
if alpha = 0
if copOn = 1
if sAlpha > 255 then alpha = 1
if sAlpha < 256
SetSpriteColorAlpha(cSpr, sAlpha)
SetSpriteColorAlpha(cSpr2, sAlpha)
endif
endif
endif
copTime# = timer()
copX# = 420 + sin(copTime#*copSpeed#+i*4)*copHeight
copX2# = 420 + sin(copTime#*copSpeed2#+i*4)*copHeight
SetSpritePositionByOffset(cSpr, copX#, 4*i+100)
SetSpritePositionByOffset(cSpr2, copX2#, 4*i+100)
textX[i] = textX[i] - xSpeed
if textX[i] < -tSize/2
textX[i] = screenWidth + ((tSize/2)*wrap)
textPos = textPos + 1
if Mid(text$, textPos, 1) = "&" then textPos = 1
if Mid(text$, textPos, 1) = "*"
textPos = textPos + 1
trigger = 2
endif
if Mid(text$, textPos, 1) = "%"
textPos = textPos + 1
scrollOff = 1
for sc = 1 to 180
DeleteText( sc )
next sc
endif
if trigger = 2
//SetTextColor(i, Random(50,255), Random(50,255), Random(50,255), 255)
SetTextColor(i, 0, 255, 0, 255)
endif
SetTextString(i, Mid(text$, textPos, 1))
endif
time# = timer()
y# = 318 + sin(time#*speed#+i*4)*height
SetTextPosition(i,textX[i], y#)
if trigger = 2
textX2[i] = textX2[i] - xSpeed2
if textX2[i] < -tSize/2
textX2[i] = screenWidth + ((tSize/2)*wrap)
textPos2 = textPos2 + 1
if Mid(text2$, textPos2, 1) = "&" then textPos2 = 1
if Mid(text2$, textPos2, 1) = "^"
textPos2 = textPos2 + 1
copOn = 1
sAlpha = 0
endif
//if trigger = 2
// SetTextColor(i, Random(50,255), Random(50,255), Random(50,255), 255)
//endif
SetTextString(i+textNum, Mid(text2$, textPos2, 1))
endif
time2# = timer()
y2# = 318 + sin(time2#*speed2#+i*4)*height2
SetTextPosition(i+textNum,textX2[i], y2#)
endif
// use this bit to get rid of scroll, needs changing
if scrollOff = 1
DeleteSprite( copSpr[startNum] )
DeleteSprite( copSpr2[startNum] )
//DeleteText( startNum )
//DeleteText( startNum + textNum )
startNum = startNum + 1
if startNum = copNum
DeleteSprite( copSpr[startNum] )
DeleteSprite( copSpr2[startNum] )
DeleteImage ( copImage )
//DeleteText( startNum )
//DeleteText( startNum + textNum )
alpha = 0
sAlpha = 0
scrollOff = 0
startNum = 1
countDown = 0
trigger = 0
event = 5
endif
sync()
endif
//b# = 100 + sin(time#*speed#+i*2)*100
Next i
elseif event = 5
endif
//Print( ScreenFPS() )
Sync()
loop
amigaBall:
ball[i].b#=ball[i].b#+90.0/ball[i].bsp#
if ball[i].b#> 360.0 then ball[i].b#=ball[i].b#-180.0
SetSpritePositionByOffset(ballSpr[i], (screenWidth/2)+ball[i].xpos#, ball[i].ypos#+sin(ball[i].b#*1)*ball[i].bh)
SetSpriteScaleByOffset(ballSpr[i], ball[i].sc#, ball[i].sc#)
if ball[i].sc# >= 0.08 and ball[i].sc# <= 0.09
SetSpriteColorAlpha(ballSpr[i], 50)
ball[i].sc#=ball[i].sc#+0.001
//bh=bh+0.5
ball[i].ypos#=ball[i].ypos#+0.5
bsp#=bsp#-0.04
if ball[i].xpos# < 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# - 0.01
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# - 0.03
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# - 0.05
endif
elseif ball[i].xpos# > 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# + 0.01
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# + 0.03
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# + 0.05
endif
endif
elseif ball[i].sc# > 0.09 and ball[i].sc# <= 0.2
SetSpriteColorAlpha(ballSpr[i], 100)
ball[i].sc#=ball[i].sc#+0.003
ball[i].bh=ball[i].bh+1
ball[i].ypos#=ball[i].ypos#+1
ball[i].bsp#=ball[i].bsp#-0.06
if ball[i].xpos# < 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# - 0.1
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# - 0.5
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# - 1
endif
elseif ball[i].xpos# > 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# + 0.1
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# + 0.5
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# + 1
endif
endif
elseif ball[i].sc# > 0.2 and ball[i].sc# <= 0.5
SetSpriteColorAlpha(ballSpr[i], 200)
ball[i].sc#=ball[i].sc#+0.006
ball[i].bh=ball[i].bh+2
ball[i].ypos#=ball[i].ypos#+1.2
if ball[i].xpos# < 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# - 0.2
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# - 1
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# - 2
endif
elseif ball[i].xpos# > 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# + 0.2
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# + 1
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# + 2
endif
endif
elseif ball[i].sc# > 0.5
SetSpriteColorAlpha(ballSpr[i], 255)
ball[i].sc#=ball[i].sc#+0.02
ball[i].bh=ball[i].bh+3
ball[i].ypos#=ball[i].ypos#+2
if ball[i].xpos# < 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# - 0.7
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# - 1.5
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# - 3
endif
elseif ball[i].xpos# > 0
if ball[i].speed# = 1
ball[i].xpos#=ball[i].xpos# + 0.7
elseif ball[i].speed# = 2
ball[i].xpos#=ball[i].xpos# + 1.5
elseif ball[i].speed# = 3
ball[i].xpos#=ball[i].xpos# + 3
endif
endif
endif
if ball[i].bh >= 260 then SetSpriteColorAlpha(ballSpr[i], 50)
if ball[i].bh >= 290
ball[i].sc# = 0.08
ball[i].bh=40
ball[i].ypos#=300.0
ball[i].bsp#=20
ball[i].b#=180
ball[i].xpos#= Random2(-30, 30)
if ball[i].xpos# >= -30 and ball[i].xpos# < -20
ball[i].speed# = 3
elseif ball[i].xpos# >= -20 and ball[i].xpos# < -10
ball[i].speed# = 2
elseif ball[i].xpos# >= -10 and ball[i].xpos# < 0
ball[i].speed# = 1
elseif ball[i].xpos# > 0 and ball[i].xpos# < 10
ball[i].speed# = 1
elseif ball[i].xpos# >= 10 and ball[i].xpos# < 20
ball[i].speed# = 2
elseif ball[i].xpos# >= 20 and ball[i].xpos# <= 30
ball[i].speed# = 3
elseif ball[i].xpos# >= 0
ball[i].speed# = 0
endif
endif
return
function createTunnel(spTun)
for i = 2 to 6
AddSpriteAnimationFrame( spTun, LoadImage("tunnel" + str(i) + ".png" ))
next i
//SetSpriteSize(spTun,screenWidth*1.5,screenHeight*1.5)
SetSpriteSize(spTun,screenWidth*2,screenHeight*2)
SetSpriteOffset( spTun, GetSpriteWidth( spTun )/2, GetSpriteHeight (spTun )/2 )
SetSpritePositionByOffset( spTun, screenWidth/2, screenHeight/2 )
SetSpriteColorAlpha(spTun, 0)
PlaySprite( spTun, 30 )
endfunction
function snake(i,s)
spr=createsprite(snakeImage)
sprhead=createsprite(snakehead)
SetSpriteSize(spr,s,s)
SetSpriteSize(sprhead,s+60,s+60)
SetSpriteColorAlpha(sprHead, 0)
SetSpriteColorAlpha(spr, 0)
if i = num
snakeSpr[i]=sprhead
else
snakeSpr[i]=spr
endif
endfunction
function spriteOn (mvOnSprite, endPoint, tween)
if tween = 1
CreateTweenSprite(1, 2.5)
SetTweenSpriteX(1, screenWidth, endPoint, TweenOvershoot())
PlayTweenSprite(1, mvOnSprite, .5)
elseif tween = 2
CreateTweenSprite(1, 2.0)
SetTweenSpriteY(1, 0 - GetSpriteHeight( mvOnSprite ), endPoint, TweenBounce())
SetTweenSpriteAngle( 1, 360,0, TweenEaseOut1() )
PlayTweenSprite(1, mvOnSprite, .1)
endif
while GetTweenSpritePlaying(1, mvOnSprite)
UpdateAllTweens( GetFrameTime() )
Sync()
endwhile
DeleteTween( 1 )
endfunction
function wait (time#)
while timer() < time#
sync()
endwhile
endfunction
function spriteOff (mvOffSprite, startPoint)
CreateTweenSprite(1, 1.5)
SetTweenSpriteX(1, startPoint, -screenWidth, TweenSmooth2())
PlayTweenSprite(1, mvOffSprite, .1)
while GetTweenSpritePlaying(1, mvOffSprite)
UpdateAllTweens( GetFrameTime() )
Sync()
endwhile
DeleteTween( 1 )
endfunction