TGC Codebase Backup



AGK Logo Display by Webber

3rd May 2017 20:21
Summary

Displays in full screen the Made with App Game Kit Logo.



Description

This code fades in the MADE WITH AGK logo then waits half a second and fades out.You can insert this code at the start of your game to show your support to AGK.The image used is located at:
https://www.appgamekit.com/documentation/distribution.html



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    SetVSync(1)
SetClearColor(0,0,0) rem black background
ClearScreen()
sync()

setVirtualResolution(640,640)
setWindowSize(GetVirtualHeight(),GetVirtualWidth(),1)

rem Load Made-With-AGK Logo
loadImage(1,"Made-With-AGK-500px.png")
createSprite(1,1)
setSpriteOffset(1,256,256)
setSpritePositionByOffset(1,GetVirtualWidth()/2.0,GetVirtualHeight()/2.0)

rem Fade Logo in
for i = 1 to 255 step 5
	SetSpriteColorAlpha(1,i)
	sync()
next i

sleep(500)

rem Fade Logo out
for i = 254 to 0 step -5
	SetSpriteColorAlpha(1,i)
	drawSprite(1)
	sync()
next i

deleteSprite(1)
deleteImage(1)

sleep(250)