Sorry, I meant without using AppGameKit's physic's engine
x# = 0.0
y# = 0.0
if ( GetViewOffsetX ( ) > 15300 )
HidePlayer ( )
g_iGameState = 2
endif
SetViewOffset ( GetViewOffsetX ( ) + x#, 0 )
fScreenX# = WorldToScreenX ( GetSpriteX ( g_iPlayerShip ) )
x1# = GetDirectionX ( )
y1# = GetDirectionY ( )
if gState = JumpingUp
if GetSpriteY(g_iPlayerShip) >= gMaxJumpHeight
y# = -20
x# = GetJumpingMotion(gPrevState)
else
gPrevState = gState
gState = JumpingDown
gMaxJumpHeight = 300
PlaySprite ( g_iPlayerShip, 50, 0, 25, 30 )
endif
elseif gState = JumpingDown
if GetSpriteY(g_iPlayerShip) >= 300
SetSpritePosition(g_iPlayerShip, GetSpriteX(g_iPlayerShip), 300)
PlaySprite ( g_iPlayerShip, 10, 1, 1, 10 )
gPrevState = gState
gState = Standing
else
y# = 20
x# = GetJumpingMotion(gPrevState)
endif
elseif InputSpace()
if gState <> JumpingUp or gState <> JumpingDown
gMaxJumpHeight = GetSpriteY(g_iPlayerShip) - 150
PlaySprite ( g_iPlayerShip, 50, 0, 20, 24 )
gPrevState = gState
gState = JumpingUp
endif
endif
x# = GetSpriteX ( g_iPlayerShip ) + x#
y# = GetSpriteY ( g_iPlayerShip ) + y#
if x# > GetVirtualWidth() - GetSpriteWidth(g_iPlayerShip) then x# = GetVirtualWidth() - GetSpriteWidth(g_iPlayerShip)
if x# < 0 then x# = 0
if y# < 0 then y# = 0
if y# > GetVirtualHeight() - GetSpriteHeight(g_iPlayerShip) then y# = GetVirtualHeight() - GetSpriteHeight(g_iPlayerShip)
SetSpritePosition ( g_iPlayerShip, x#, y#)
MOD edit: Make sure to close the code tag but thanks for trying