Give this a shot Cola...
I moved your camera updates after all movement commands, then added object position checks for your sphere with float values for precision.
sync on:sync rate 60
Make object sphere 1,20
position object 1,0,0,0
make object cube 2,20
position object 2,0,0,40
make object cube 3,20
position object 3,20,0,40
make object cube 4,20
position object 4,-20,0,40
make object cube 5,20
position object 5,0,20,40
make object cube 6,20
position object 6,0,-20,0
make object cube 7,20
position object 7,0,-20,20
make object cube 8,20
position object 8,0,-20,40
make camera 1
do
rem gravity
move object down 1,Falling#
inc Falling#,0.001
rem positions
x=object position x(1)
y=object position y(1)
z=object position z(1)
rem collision
for b=2 to 8
D#=INTERSECT OBJECT(b,x+10,y,z,x+10,y-10.0,z) `this tests the "Ground Mesh" for a collision (or ray intersection)
if D#<10.0 and D#>0.0
` position object 1,x,y+(10.0-D#),z
position object 1,x,y,z
Falling#=0
Endif
D#=INTERSECT OBJECT(b,x-10,y,z,x-10,y-10.0,z) `this tests the "Ground Mesh" for a collision (or ray intersection)
if D#<10.0 and D#>0.0
` position object 1,x,y+(10.0-D#),z
position object 1,x,y,z
Falling#=0
Endif
D#=INTERSECT OBJECT(b,x,y,z+10,x,y-10.0,z+10) `this tests the "Ground Mesh" for a collision (or ray intersection)
if D#<10.0 and D#>0.0
` position object 1,x,y+(10.0-D#),z
position object 1,x,y,z
Falling#=0
Endif
D#=INTERSECT OBJECT(b,x,y,z-10,x,y-10.0,z-10) `this tests the "Ground Mesh" for a collision (or ray intersection)
if D#<10.0 and D#>0.0
` position object 1,x,y+(10.0-D#),z
position object 1,x,y,z
Falling#=0
Endif
Next b
rem movement and jumping
if upkey()=1 then position object 1,x,y,z+1
if downkey()=1 then position object 1,x,y,z-1
if rightkey()=1 then position object 1,x+1,y,z
if leftkey()=1 then position object 1,x-1,y,z
if spacekey()=1 and Falling#=0.0
move object up 1,1
Falling#=-3.0
endif
rem new positions
x2=object position x(1)
y2=object position y(1)
z2=object position z(1)
rem side-side collision
for b=2 to 8
D#=INTERSECT OBJECT(b,x2,y2,z2,x2-10.0,y2,z2)
if D#<10.0 and D#>0.0
position object 1,x2+(10.0-D#),y2,z2
Endif
D#=INTERSECT OBJECT(b,x2,y2,z2,x2+10.0,y2,z2)
if D#<10.0 and D#>0.0
position object 1,x2-(10.0-D#),y2,z2
Endif
D#=INTERSECT OBJECT(b,x2,y2,z2,x2,y2,z2-10.0)
if D#<10.0 and D#>0.0
position object 1,x2,y2,z2+(10.0-D#)
Endif
D#=INTERSECT OBJECT(b,x2,y2,z2,x2,y2,z2+10.0)
if D#<10.0 and D#>0.0
position object 1,x2,y2,z2-(10.0-D#)
Endif
Next b
xcam#=object position x(1)
ycam#=object position y(1)
zcam#=object position z(1)
rem camera
position camera 1,xcam#,ycam#,zcam#-15
sync
loop
Good Luck with your game.
EDIT: oops almost forgot I added some code into your collision checks that just keeps the sphere in place instead of moving it upward if a collision occurs, should keep it smooth instead of jumpy.
I remmed out your original lines but left them in place.