Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Swimming and Jumping

Yeah, i know, it sounds complicated, but not really.

JUMP
thw works:
when a player approaches an edge that is adjacent to a "hole" (terrain 4), and the space after that hole (in his facing direction) is passable, he jumps two spaces in that direction, playing SE, "Jump01, 65%, 90%."

SWIM
here's how it works:

when the player approaches "water" (terrain 2), and tries to walk on it,(pressus forward while facing water) he jumps in, lands with SE "Dive02, 60%, 125%) and his walk graphic changes to "charset_swim" (charset being what his original charset is defined as in the database, but if this easier: replace charset with character name)

In this state, he can now swim!
likewise, when he is "swimming," (create a flag for "swimming") and he approaches a tile (facing tile and pressing forward) which is passable, mind, IN THAT DIRECTION, (think, if he would be able to walk on it) he quickly switches to his "climb out" charset (charset_climbout) for about 4 frames, at which time the character cannot move, and when this is done, he moves on land and switches back to the old original charset.

NOTES:
-> Jumping should have priority over swimming, so if there are platforms over water, he doesn't dive in, rather than jump on them.
->If swimming seems too difficult, just do jumping.
-> I will be using that 8-way walk of DerVVulfman's...

EDIT: I'd like to add one more movement:

CLIMB
Simple, if a player approaches a "climable" (terrain 5) tile, he switches to his charset_climb graphic, and when he approaches to climb down (space below "climable" is passable) he switches back to his original charset and jumps off simultaneously. (jump direction = up)

however, if the player attempts to climb onto a space that is above him and is passable, he switches to charset_climbout for 4 frames, immobile until 4 frames is up and moves onto tile in original charset.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top