07-05-2015, 05:35 PM
It's more about how you got about fixing problems. From the above code alone, I wouldn't know. It's up to you how far you go, though. You have to consider how practical it is, priority, is it game breaking, etc.
You know why the character falls when you have an offset of 25, but don't understand the hop at 26. Maybe there are rounding issues? Do you know the order in which your character data changes? For example:
...player input
...apply physics
...apply collision resolution
...draw everything
That's the typical order. There would be a visual issue if it was
...player input
...apply physics
...draw everything
...apply collision resolution
Then, your player would be seen a few pixels in the ground. Maybe, something similar is happening which makes the player pop up for a few frames (how many frames does it last?- ...5?).
If you still can't figure it out, you should try debugging. GM has a debugger, right? If it's not good enough, you can place debug messages that output to the console while the game is running.
http://docs.yoyogames.com/source/dadiosp...index.html
http://docs.yoyogames.com/source/dadiosp...ssage.html
For example, you'd put "show_debug_message()" at places of interest to ensure that certain things occur in an the expected order.
You know why the character falls when you have an offset of 25, but don't understand the hop at 26. Maybe there are rounding issues? Do you know the order in which your character data changes? For example:
...player input
...apply physics
...apply collision resolution
...draw everything
That's the typical order. There would be a visual issue if it was
...player input
...apply physics
...draw everything
...apply collision resolution
Then, your player would be seen a few pixels in the ground. Maybe, something similar is happening which makes the player pop up for a few frames (how many frames does it last?- ...5?).
If you still can't figure it out, you should try debugging. GM has a debugger, right? If it's not good enough, you can place debug messages that output to the console while the game is running.
http://docs.yoyogames.com/source/dadiosp...index.html
http://docs.yoyogames.com/source/dadiosp...ssage.html
For example, you'd put "show_debug_message()" at places of interest to ensure that certain things occur in an the expected order.