Hello,
Although I have owned a copy of AppGameKit since it's release on Steam I have yet to put it to use. The last few hours I have been playing around with various functions and am extremely impressed with the easy of use and the documentation seems pretty solid too.
I am got to the point where I wanted to create a 2 frame animated sprite. I placed both images in the media folder and ran the following;
// show all errors
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Sprite_Draw" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
bunny1 = LoadImage("Bunny1.png")
bunny2 = LoadImage("Bunny2.png")
bunny = CreateSprite(bunny1)
AddSpriteAnimationFrame(bunny, bunny2)
PlaySprite(bunny,0.2,1)
do
Print( ScreenFPS() )
SetSpritePosition(bunny, 250, 250)
Sync()
loop
I am unable to get my sprite to animate through the 2 frames, upon loading frame 2 is showing which made me think it did get to frame 2 but didn't look. Looking at the docs looping is default.
What am I doing wrong here?