For that code you requested, it's not much, but have a look at this;
Sync On : Sync Rate 60
Randomize Timer()
`Set up a character
Make Object Cube 1,40
Scale Object 1,100,250,50
Position Object 1,100,Object Size Y(1),100
Point Object 1,200,Object Size Y(1),200
`Sets the character so that it has collision
Set Object Collision On 1
Set Object Collision To Boxes 1
`Set up a scene
For x = 2 To 50
Make Object Cube x,Rnd(20) + 20
xpos = Rnd(1000)
ypos = Object Size Y(x)/2
zpos = Rnd(1000)
Position Object x,xpos,ypos,zpos
`Set's the objects so they have collision
Set Object Collision On x
Set Object Collision To Boxes x
Next x
Make Object Plain 101,1000,20
Position Object 101,0,10,500
YRotate Object 101,90
Make Object Plain 102,1000,20
Position Object 102,1000,10,500
YRotate Object 102,90
Make Object Plain 103,1000,20
Position Object 103,500,10,0
Make Object Plain 104,1000,20
Position Object 104,500,10,1000
`Set up the camera
Position Camera -50,200,-50
`Main loop
Do
`Moves the object along
Move Object 1,5
`If the object collides with any other object in the world
objcol = Object Collision(1,0)
If objcol > 0
`Moves the object back, so it's not colliding
Move Object 1,-5
`Just Yrotates the object at a random value between 180 degrees in either direction
YRotate Object 1,WrapValue(Object Angle Y(1) + (Rnd(360) - 180))
lasthit$ = Str$(objcol)
EndIf
Point Camera Object Position X(1),Object Position Y(1) + 50,Object Position Z(1)
`Prints some debug info to the screen
Text 0,20,"Frames Per Second; " + Str$(Screen FPS())
Center Text Screen Width()/2,0,"Object Last Collided With Object Number " + lasthit$
Sync
Loop
That'll move an obejct till it collides, when it does, it's randomly rotated, and moved along again.
Hope I Helped...
Jess.

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy