Quote: "I still love the fade effects you have going on all these objects. Would love to beg, borrow, or steal that for my WordTrix port I'm doing for AGK
"
The nearest I have got to it is this code below, but it doesn't work as I expected, the trail doesn't fade away. Maybe someone can tweak it to work?
#constant cBOX = 200
#constant cMOVE = 6
// Project: Trails
// Created: 2015-02-03
// set window properties
SetWindowTitle( "Trails" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetClearColor(0,0,0)
//CREATE AN IMAGE TO RENDER THE LAST SCREEN TO
ri = CreateRenderImage(GetVirtualWidth(), GetVirtualHeight(),0,0)
//CREATE A FADED SPRITE TO SHOW THE LAST SCREEN
spriteBack = createSprite(ri)
SetSpritePosition(spriteBack,0,0)
SetSpriteColorAlpha(spriteBack,128)
SetSpriteDepth(spriteBack,20)
//CREATE A SPRITE TO BOUNCE AROUND THE SCREEN
spriteBounce = createSprite(0)
setSpriteSize(spriteBounce,cBOX,cBOX)
SetSpriteColorAlpha(spriteBounce,212)
SetSpritePositionByOffset(spriteBounce, getVirtualWidth()/2, GetVirtualHeight()/2)
moveY = cMOVE
moveX = cMOVE
do
//THIS BIT JUST MOVES THE SPRITE
setSpriteX(spriteBounce, getSpriteX(spriteBounce) + moveX)
setSpriteY(spriteBounce, getSpriteY(spriteBounce) + moveY)
if GetSpriteXByOffset(spriteBounce) > getVirtualWidth() - (cBOX/2) then moveX = cMOVE * -1
if GetSpriteXByOffset(spriteBounce) < cBOX/2 then moveX = cMOVE
if GetSpriteYByOffset(spriteBounce) > getVirtualHeight() - (cBOX/2) then moveY = cMOVE * -1
if GetSpriteYByOffset(spriteBounce) < cBOX/2 then moveY = cMOVE
SetSpriteAngle(spriteBounce, GetSpriteAngle(spriteBounce) + 5)
//THIS BIT GETS THE LAST SCREEN AND APPLIES IT TO THE SEMI_TRANSPARENT BACKGROUND SPRITE
SetRenderToImage(ri,0)
render()
SetRenderToScreen()
Print( ScreenFPS() )
Sync()
loop
Quidquid latine dictum sit, altum sonatur