So I have been having a strange issue, when I run a test on my game the character jumps about 64 pixels high. When I send the file to my friends to test it the character jumps only about 32 pixels high. Anyone know what the issue might be? I'm using the provided platforming system.
Sorry, I don't mean to be a nuisance but it's really impeding my progress currently. Does anyone have any ideas why the game might operate differently on different computers?
It's hard to say without you posting a capx for us to see how you coded/implemented your game.
The platform behavior is framerate independent so there shouldn't be differences.
Here is a link to the .capx
I placed the character next to a platform with an arrow pointing to it, when I test the game on my computer I can easily jump to it but when I test it on other computers I can't even reach the top of the ledge. Sorry for the messy organization this is mostly just testing out ideas.
Controls are the arrow keys and space to jump.
Indeed, I can't reach the platform either.
What's your computer specs and OS ?
Anyway, if you change the value of jump strength the platform is reachable.
Ashley any idea about this ?
The computer I'm using isn't spectacular. I'm running on Window XP and 2 gigs of ram.
Develop games in your browser. Powerful, performant & highly capable.
This may be a completely stupid answer, could it have anything to do with Firefox? as I run it in chrome and it it cannot reach the ledge, I do not have Firefox to try?
I also noticed that you can grab the edge of the arrowed level and get up that way, edge grab or whatever you call it?
I think the jump height does vary with the framerate.
Jumping is just projectile motion and you can calculate mathematically the jump height with this formula:
jump_height = (jumpStrength^2)/(2 * gravity)
In the case of the example the calculated jump height should be 50 pixels.
When I ran the capx I measured the jump height and it was 56 pixels. On my machine it was running a about 30fps.
The platform behavior currently changes the y position like this:
y = y + v_velocity * dt
If it's changed to this:
y = y + v_velocity * dt + 0.5 * gravity * dt * dt
Then the measured jump height will match the calculated jump height regardless the framerate.
Ashley my proposed fix is to change this:
..\Construct 2\exporters\html5\behaviors\platform\runtime.js lines 582-583
this.inst.x += this.dy * dt * this.downx;
this.inst.y += this.dy * dt * this.downy;
this.inst.x += (this.dy * dt + 0.5 * this.g * dt * dt) * this.downx;
this.inst.y += (this.dy * dt + 0.5 * this.g * dt * dt) * this.downy;
thousand apologies for necroing this post, but has this been addressed? I'm seeing height inconsistencies in my really lightweight game. Firefox *and* chrome.
I'm on here as well because I am also seeing jump height inconsistencies.
I created a trampoline and drew a line as reference, I just let the ball bounce up and down and it reaches different heights without any intervention.
This makes it hard to tune a good game where the main mechanic is jumping :).
I'm on Firefox.
Any solutions yet ?
Thank you !