Here is a page on jumping.
http://game-editor.com/JumpingFor your collision problem, you'll have to split the collisions into two or three events. The walls, ground, and ceiling each need there own event, as they each do different things. The current collision event you have will be the top collision with your tiles. The left or right side collision event should look like this.
- Code: Select all
double yvel = yvelocity;
PhysicalResponse(MOVE_EVENT_ACTOR_ONLY, USE_CALCULATED_MASS, 1.000000,1.000000, 0.000000, 0.000000);
yvelocity=yvel;
The ceiling collision should just be a physical response. The reason it is different than the ground is when you add the jump variable for your game, you don't want it to be restored by hitting the ceiling.