I have just finished a tutorial on this for the next AppGameKit Bitesize tutorial in the TGC newsletter. There was recently another post on the forum where I posted a simple example using physics sprites. I'll find the link...
Edit: better still here is the code I posted.
rem
rem AGK Application
rem
rem Landscape App
SetDisplayAspect( 4.0/3.0 )
rem create a virtual joystick
AddVirtualJoystick(1,10,88,12)
rem create a jump button
AddVirtualButton(1,90,88,8)
rem create a character
spr = createSprite(0)
setSpriteSize(spr,4,8)
setSpriteOffset(spr,2,4)
setSpritePositionByOffset(spr,50,96)
setSpritePhysicsOn(spr,2)
setSpritePhysicsCanRotate(spr,0)
boxman = spr
rem create static platforms
spr = createSprite(0)
setSpriteSize(spr,30,2)
setSpriteOffset(spr,15,1)
setSpritePositionByOffset(spr,15,75)
setSpritePhysicsOn(spr,1)
spr = createSprite(0)
setSpriteSize(spr,30,2)
setSpriteOffset(spr,15,1)
setSpritePositionByOffset(spr,85,50)
setSpritePhysicsOn(spr,1)
spr = createSprite(0)
setSpriteSize(spr,30,2)
setSpriteOffset(spr,15,1)
setSpritePositionByOffset(spr,15,25)
setSpritePhysicsOn(spr,1)
rem create a kinematic platform
spr = createSprite(0)
setSpriteSize(spr,30,2)
setSpriteOffset(spr,15,1)
setSpritePositionByOffset(spr,50,15)
setSpritePhysicsOn(spr,3)
kinematic = spr
direction = 10
rem A Wizard Did It!
do
rem update kinematic platform
setSpritePhysicsVelocity(kinematic,0,direction)
if getSpriteYbyOffset(kinematic)>85
direction=-10
else
if getSpriteYbyOffset(kinematic)<15
direction=10
endif
endif
rem jump
jump = GetVirtualButtonPressed(1)
if jump>0
setSpritePhysicsVelocity(boxman,getSpritePhysicsVelocityX(boxman),-jump*60)
endif
rem move
setSpritePhysicsVelocity(boxman,GetVirtualJoystickX(1)*30,getSpritePhysicsVelocityY(boxman))
Sync()
loop