Be a Supporter!

wall jumps in a platformer?

  • 233 Views
  • 3 Replies
New Topic Respond to this Topic
BunnyBoysInc818
BunnyBoysInc818
  • Member since: Nov. 22, 2008
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
wall jumps in a platformer? 2009-08-24 12:15:37 Reply

im making a platformer game but i dont know how to make the character be able to wall jump. i want the character to be able to cling onto a wall and then jump again! can someone please reply or give me a link to good tutorial? thanks


aliens abducted my signature...

Daverom
Daverom
  • Member since: Mar. 11, 2009
  • Offline.
Forum Stats
Member
Level 15
Melancholy
Response to wall jumps in a platformer? 2009-08-24 12:31:07 Reply

I don't know much about game but I think the programming forum would probably be able to help you out more.

CybexALT
CybexALT
  • Member since: Oct. 13, 2005
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to wall jumps in a platformer? 2009-08-24 12:39:01 Reply

This is the right forum.

As for answering the question, you're first going to want to be able to detect when the character is up against a wall. You can do this with a simple hitTest. After that, you need to know what side of the wall it is on. You can easily do this by comparing registry points if needed. Once you've coded for it to be able to detect when you are on a wall, and know which side you're on, you should make it so that if you jump and press the required direction key, then it jumps again.

Mystery-Moon-Pie-Aud
Mystery-Moon-Pie-Aud
  • Member since: Feb. 7, 2009
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to wall jumps in a platformer? 2009-08-24 16:07:28 Reply

I'm no flash programmer, but I've heard that basically you make it so when the character touches the wall, reset the jump so as if he hadn't jumped yet, so that the character jumps again normally.

So do a hit test on the wall and when the character does that hit, his jump setting is reset to 0, and he can jump again.

If you want it to look like the character is actually jumping off of a wall, I guess you could have another jump style so when the character hits the wall it sets off that action.


Strychnine and cyanide. A healthy part of this complete breakfast.