include "cbChipmunk.cb"
Const BODY_MASS = 10
Const BODY_INERTIA = 10
Const BODY_RADIUS = 20
//Luodaan runko ja laitettaan se hieman ylemmäksi
body = cpBodyNew(BODY_MASS,BODY_INERTIA,0,100)
//Törmäysmuoto on ympyrä jonka säde on BODY_RADIUS
circleGeometry = cpCircleGeometryNew(BODY_RADIUS)
//Luodaan rungolle törmäysmuoto
shape = cpShapeNew(body,circleGeometry)
Repeat
//Päivitetään fysiikoita 1/60 osa sekuntti
cpUpdate(1.0/60.0)
//Piirretään näyttö
DrawScreen
//Odotettaan fysiikoiden päivittymistä
cpWaitForUpdate()
//Haetaa runkojen sijainnit
cpPullAll()
Forever