I am trying to make my first program using AppGameKit, and I am having some problems. Its a simple program in which a sprite moves, but i cannot get it to move. Ive loaded in the image for it, but i feel like the image is not linked the the sprite name correctly. I was hoping if i post my code someone could help me out, thanks...
// Project: new app
// Created: 2016-02-19
// set window properties
SetWindowTitle( "Kitty game" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 800, 600 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetVirtualResolution (800,600)
//rem load in images and sounds
LoadImage = (1, "KITTY.jpg")
//rem set up variable
1 = KITTY
KITTYXpos = 400
KITTYYpos = 300
//rem create sprites
CreateSprite (KITTY,1)
// rem put sprites on the screen
//rem do loop
do
SetSpritePosition (KITTY, KITTYXpos, KITTYYpos)
gosub moveplayer
sync()
loop
//rem gosubs
moveplayer :
if GetRawKeyState(38)
KITTYYpos = KITTYYpos -5
endif
if GetRawKeyState(40)
KITTYYpos = KITTYYpos +5
endif
if GetRawKeyState(37)
KITTYXpos = KITTYXpos -5
endif
if GetRawKeyState(39)
KITTYXpos = KITTYXpos +5
endif
SetSpritePosition(KITTY, KITTYXpos, KITTYYpos)
Return