# Digivance

Member

247

1724 Excellent

• Rank
Member

• Website
• Interests

8. ## What is the value of '\n' in Windows?

Lode, you many times will receive 10 followed by 13 as if it where two separate keystrokes. Personally I normally counter act this in cros platform apps by simply ignoring the character 10 or \r. Haven't found many if any reasons to use character 10 outside of windows.
9. ## Good maths for jump in 2D beatmup in Game Maker?

Kburkhart, wouldn't be the first time I misunderstood and redefined the same answer. All the same glad that we as a community where able to help the op
10. ## Good maths for jump in 2D beatmup in Game Maker?

Not sure to what extent I agree or disagree here.  What you are mentioning applies to games that have emulated depth (or 2.5d), where the Y value changes as the character moves deeper or shallower into the screen.  If this is the case you have a point where the character must land at the correct Y position but to say that it will always be the same as the Y position that the character had jumped from might be incorrect.  For example what if the player is holding up and right while jumping?  The character should land a bit higher in Y (deeper into the screen) and to the right of where it had jumped from.  Otherwise you get that uncomfortable linear jumping that we saw back in the 16 bit days.   Solution, use dual vectors.  One for the characters level position and an offset that applies to movement based animations (such as jumping or a lunging attack).  You would then apply your velocity of movement based on the offset, render and calculate collision versus the true position being the offset from the position but always bring the character back to the new position which depending on what your doing might be part position and offset or might return to the original position.  So for example, jumping would have the characters level movements effect x&y or the position while controlling the characters jump through the Y's offset.  The characters Y offset would be effected by the jumping velocity and gravity while the position would be effected by directional input.  The idea would be to add then subtract to the offset's Y bringing it back to the position Y as calculated by the input.  For something like a lunging or thrusting attack we might use the offset to propel the character forward then backward in the X axis bringing it back to the start X position.