If you want to use Sparky's collision detection, first set up the collision for the character. Something like:
"2" is the object id, "0" means no group, "1" means sphere collision.
Then, setup the collision for the level. For the level, you want to test for collision against each polygon.
SC_SetupComplexObject(1, 1, 2);
The first "1" is the id of my level, the second "1" is the group it's in, "2" is the faces per node (2 is basic).
To stop you character from going through walls, you have to reset the character to it's last collision-free position. To do this, you must store the characters original position. Move the character, if there is a collision, set the characters position back.
To stop the character from going through the ground, you must do something similar, but you have to use sliding collision, or your character won't be able to move.
Check out the Sliding Demo that comes with Sparky's collision to see some code.