physX_open();
pX_setgravity(vector(0,0,-9.81));
level_load("");
// create terrain
ENTITY* newterrain = ent_createterrain(NULL,vector(0,0,0),10,10,100);
pXent_settype(newterrain, PH_STATIC, PH_POLY);
ENTITY* cube = ent_create("brett.mdl", vector(0,0,10),NULL); // The red model
pXent_settype(cube, PH_STATIC, PH_POLY);
ENTITY* tmp = ent_create("horseshoe.mdl", vector(0,0,50), NULL); // The yellow model
pXent_settype(tmp,PH_RIGID,PH_BOX);
ENTITY* leftShape = ent_create("leftShape.mdl",vector(0,-5,40),NULL);
ENTITY* rightShape = ent_create("rightShape.mdl",vector(0,5,40),NULL);
ENTITY* topShape = ent_create("topShape.mdl",vector(0,0,45),NULL);
pXent_addshape(tmp,leftShape,PH_BOX);
pXent_addshape(tmp,topShape,PH_BOX);
pXent_addshape(tmp,rightShape,PH_BOX);
pXent_removeshape(tmp,0);
ptr_remove(leftShape);
...