Re:Show HN: I've been making one HTML5 game per week. Here's...
by panic on Wednesday March 12, 2014 @03:38PM
(#7387776)
Most platformer games actually let you jump for a short time after you run off the edge of a platform. The lack of this mechanic is what causes the jump to feel inconsistent.
I guess depending on what you want out of the game mechanics, you could leave it as is or extend the "range" of a valid jump to slightly beyond the edge (perhaps half the width of the character). I guess some good questions that you could ask are: - Is it a faster paced game where jumping from platform to platform quickly matters? - Do you want to focus more on fluid movement and the ability of the player to think about their moves ahead of time? - Are there any gaps in any level where the jump is nigh impossible without performing a "perfect" jump. If so, is that a feature? (maybe it's supposed to be that difficult?)
EDIT: I've been looking at the source and I'm pretty sure it has to do with how Phaser checks whether the character is on solid ground or not (body.blocked.down). I'm not too sure how it calculates it (I couldn't understand the SAT.testPolygonPolygon function[1]. If anyone wants to help me with that, I'd appreciate it). I think the tilt of the character when it's running potentially makes it worse too.
[1]http://docs.phaser.io/SAT.js.html line 605