That system would only work if you're using primitive objects like boxes or spheres. If you're creating a map in a modeling program than you wont be able to move around anywhere unless you switch to polygonal detection which is slow and still unreliable.
If you're just interested in colliding with the surface of the platforms (so they stop when they land on the platform) then INTERSECT OBJECT is your friend.
Here's a very basic system:
FUNCTION Collision(Object1, Object2, Speed#)
X# = OBJECT POSITION X(Object1)
Y# = OBJECT POSITION Y(Object1)
Z# = OBJECT POSITION Z(Object1)
H# = OBJECT SIZE Y(Object1)/2
IF INTERSECT OBJECT (Object2, X#, Y#-H#, Z#, X#, Y#, Z#) > 0
POSITION OBJECT Object1, X#, Y#+Speed#, Z#
ENDIF
ENDFUNCTION
Basically the INTERSECT OBJECT command checks for any objects passing through two points, you specify what object to be checked against in the first parameter for INTERSECT OBJECT. The next 3 parameters specify the starting position of the intersection "ray", and the last 3 specify the ending position.
The function checks for intersection between the bottom of the object we want to stop colliding with the ground, to the center of the object. This way, if there's any intersection at all we know that the object must be standing on the ground.
Once we know the object is intersecting with the second object, we reposition it at its X, its Y + Speed and its Z. This way the object will move up when they hit the ground.
As I said this is a very basic system, it can cuase vibration but it works. Using this method you could take the system further, instead of moving the object upwards you could switch the falling code from moving the object downwards to forwards, eliminating the vibrations.
Incase you're confused about the function parameters here they are:
Object1 - The object you want to check collision with, so in your case the character you control.
Object2 - The object you want to check collision against, in your case the map object.
Speed# - The speed the object moves upwards when it hits the ground. Change it to suit your needs.
Below I'll show a basic example of using the function. If you have multiple map files you can use a loop to check with intersection with all of them, for example:
SYNC ON:SYNC RATE 0:AUTOCAM OFF:HIDE MOUSE
`Create a character
MAKE OBJECT SPHERE 1,10
POSITION OBJECT 1, 0,5,-130
`Create some boxes
FOR B = 2 TO 6
MAKE OBJECT BOX B, 30,5,30
POSITION OBJECT B, -100 + RND(100),2.5+RND(40),-100 + RND(100)
NEXT B
`Start Main Loop
DO
`Basic Controls
IF UPKEY()=1 THEN MOVE OBJECT 1,.5
IF DOWNKEY()=1 THEN MOVE OBJECT 1,-.5
IF LEFTKEY()=1 THEN TURN OBJECT LEFT 1,1
IF RIGHTKEY()=1 THEN TURN OBJECT RIGHT 1,1
`Allow the user to move up/down (1 moves up, 2 moves down)
IF KEYSTATE(2)=1 THEN MOVE OBJECT UP 1,1
IF KEYSTATE(3)=1 THEN MOVE OBJECT DOWN 1,1
`Camera
POSITION CAMERA OBJECT POSITION X(1),OBJECT POSITION Y(1),OBJECT POSITION Z(1)
ROTATE CAMERA OBJECT ANGLE X(1),OBJECT ANGLE Y(1),OBJECT ANGLE Z(1)
MOVE CAMERA - 30
POSITION CAMERA CAMERA POSITION X(), CAMERA POSITION Y()+10, CAMERA POSITION Z()
`Call Collision Function for all box objects
FOR i = 2 TO 6
Collision(1,i,1)
NEXT i
`End the loop
SYNC
LOOP
`Define Collision Function
FUNCTION Collision(Object1, Object2, Speed#)
X# = OBJECT POSITION X(Object1)
Y# = OBJECT POSITION Y(Object1)
Z# = OBJECT POSITION Z(Object1)
H# = OBJECT SIZE Y(Object1)/2
IF INTERSECT OBJECT (Object2, X#, Y#-H#, Z#, X#, Y#, Z#) > 0
POSITION OBJECT Object1, X#, Y#+Speed#, Z#
ENDIF
ENDFUNCTION
Like I said before this only covers collision with bellow the object, but you could easily add another intersection check above the object aswell. The side collisions are more complicated and can involve complex maths if you want to get very precise sliding collision, however if you're just looking for simple polygonal collision using htis method you could attatch 4 limbs onto the object, 1 on each side. Then shoot an intersection ray from each limb to the object, if an intersection occurs you can move the object in the opposite direction (so if theres an intersection to the right then move the object left).
<EDIT> Ok I checked out the jumping code provided and it'll work but it'll be fairly jumpy. Since you're setting the velocity to a high number theres no smooth transition going up, only going down.
He does have the idea though. Basically you move the object up at a descending rate of speed, and then down at an ascending rate of speed.
Not much time to explain now but here's a simple program break it down and figure out what it does:
SYNC ON:SYNC RATE 0:AUTOCAM OFF:HIDE MOUSE
MAKE OBJECT SPHERE 1,10
POSITION OBJECT 1,0,5,0
MAKE MATRIX 1,1000,1000,10,10
POSITION MATRIX 1,-500,0,-500
POSITION CAMERA 0,100,-300
POINT CAMERA 0,0,0
DO
IF UPKEY()=1 THEN MOVE OBJECT 1,.5
IF DOWNKEY()=1 THEN MOVE OBJECT 1,-.5
IF LEFTKEY()=1 THEN TURN OBJECT LEFT 1,1
IF RIGHTKEY()=1 THEN TURN OBJECT RIGHT 1,1
IF SPACEKEY()=1 AND jump = 0 THEN jump = 1:speed# = 5
IF jump = 1
POSITION OBJECT 1, OBJECT POSITION X(1),OBJECT POSITION Y(1)+speed#, OBJECT POSITION Z(1)
DEC speed#,.1
IF OBJECT POSITION Y(1) <= 5
POSITION OBJECT 1,OBJECT POSITION X(1),5,OBJECT POSITION Z(1)
jump = 0
ENDIF
ENDIF
SYNC
LOOP
For more info on this type of jumping and collision check out my tut at
http://www.ruccus.net/Tutorial.htm.
Goodluck,
- RUC'