Original Post
Hey all, I'm working on a Brawler (Final Fight, River City Ransom, et al.) and am a little curious about the best way to implement jumping. Here's the idea I've come up with: X,Y store the player's position relative to the ground. Height store's the player's position in the air relative to their spot in the ground. The higher the value, the higher you are in a jump. Rendering is simply draw at (X, Y - Height). Collision checks can be done with an X,Y box check then a Height check. Here's a picture describing what I mean:
Does this seem like a good way to go about it? It's the first idea that popped into my head and am wondering if there are more efficient manners. Thanks all.
Does this seem like a good way to go about it? It's the first idea that popped into my head and am wondering if there are more efficient manners. Thanks all.