UNDERSTANDING AABB HITBOX COLLISION DETECTION
In Pixel Jump, collision detection uses Axis-Aligned Bounding Box (AABB) math. Because the player sprite and spike obstacles do not rotate, checking whether two boxes overlap requires checking four simple boundary conditions:
player.x < obstacle.x + obstacle.width && player.x + player.width > obstacle.x && player.y < obstacle.y + obstacle.height && player.y + player.height > obstacle.y
TIMING THE DOUBLE JUMP FOR MAXIMUM DISTANCE
The key to clearing double-spike hazard clusters is to delay your second jump tap. Tapping jump immediately at ground takeoff limits your maximum arc height. By waiting until your character reaches the peak of the initial jump curve, your second jump adds maximum vertical lift to float over wide floating obstacles.
LEAVE A PIXEL ZINE COMMENT