Example code of simple gravity-based collisions.
;; Set up collisions so that the player can walk up slopes while not sliding down them Collisions PlayerID,WorldID,2,3 ;; Main loop Repeat ;; Gravity; VY = VelocityY VY# = VY# - .08 ;; Jump If KeyHit(57) Then VY# = 2.5 ;; Check for ground and or ceiling collision For i = 1 To CountCollisions(Player) ;; React accordingly If CollisionNY(Player,i) >= .1 Then VY# = 0 ElseIf Abs(CollisionNY(Player,i)) >= .5 Then VY# = -Abs(VY#) * .64 EndIf Next ;; Move the player TranslateEntity Player,0,VY#,0 ;; Update world UpdateWorld Until KeyHit(1)