intro
Currently here is the progress of this project:
- List of finished jump mechanics :
- Sprint jump like in Mario Bros or Pepsiman
- Auto sprint jump like in Unravel
- Secondary jump like in Tenchu 2
- Multiple jump like Sanji jump ability in One Piece
- Jump then glide like Rayman or Spyro
- List of jump mechanics that are not here yet :
- Charged jump like in Tony Hawk or any snowboarding game
- Jump from wall to wall like in Prince of Persia
- Jump then fast fall
- Jump on enemy like in Batman Arkham
- Auto jump like in Assassin's Creed
- List of extra blueprint component I end up making during this study :
-
JumpTracker
builds arrows everytime character jump, it also calculate character jump height by default -
KeyboardTracker
show keyboard input -
SpeedTracker
show horizontal speed
-
List of solved failures :
-
Override
Landed
could makeEventOnLanded
inside blueprint won't be fired -
There is
NotifyJumpApex
in blueprint and C++, no need to make new function for that task -
Jump
function will not be counted if it's called outside character class -
OnReachJumpApex
can't be access outside of character - failed to realize action axis inputs are ticking every frame
- used UPROPERTY for multiple variables, and got error in anim blueprint... should just go 1 variable 1 UPROPERTY
-
Override
-
List of unsolved failures :
- Somehow Muriel C++ character example won't use gliding animation...
- fail to create jump track with spline component
jump mechanics :
Sprint Jump
pure Blueprint |
JumpMechanic
►
SprintJump
|
pure C++ |
SprintJumpCharacter.h
+
SprintJumpCharacter.cpp
|
Sprint jump : character ability to jump higher when they jump after sprinting. Sprint jump height will be based on character horizontal speed before jump. Horizontal speed and jump z-initial speed have linear relationship.
I think Mario Bros and Pepsiman use this kind of jump mechanic.
pure Blueprint
In pure blueprint this sprint jump mechanic is made inside SprintJump
blueprint component, which is the child of JumpMechanic
blueprint component.
Below is character example using that component:
example use in video:
FengMaoAnimBP_SprintJump
+
FengMaoCharBP_SprintJump
outside repo dependencies: Paragon: Feng Mao
Implementation example of SprintJump
inside character blueprint:
note:
- make sure
SprintJump.MaxJumpZVelocity
>JumpZVelocity
, - make sure
SprintJump.MaxSprintSpeed
>MaxWalkSpeed
.
pure C++
In pure C++, the sprint jump mechanic is in SprintJumpCharacter.cpp
,
which is the child of third person character C++ template. This jump mechanic
require you to add one more action input (ex: Shift ) which is not part of third person template.
class member declaration:
Sprint jump mechanic logic:
add player input Shift in GameInput.ini
:
+ActionMappings=(ActionName="SecondaryInput",Key=LeftShift,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
Auto Sprint Jump
pure Blueprint |
JumpMechanic
►
SprintJump_auto
|
pure C++ |
SprintJump_autoCharacter.h
+
SprintJump_autoCharacter.cpp
|
Auto sprint jump : character has no sprint input, so the normal jump will always depended on how fast it walked before the jump. Just like before the horizontal speed and jump z-initial speed have linear relationship.
I think Unravel used this system.
pure Blueprint
In pure blueprint this jump mechanic is made in SprintJump_auto
blueprint component, which is the child of JumpMechanic
blueprint component.
pure C++
In pure C++, the sprint jump mechanic is in SprintJump_autoCharacter.cpp
,
which is the child of third person character C++ template.
class member declaration
auto sprint jump logic :
Secondary Jump
pure Blueprint |
JumpMechanic
►
SecondaryJump
|
pure C++ |
SecondaryJumpCharacter.h
+
SecondaryJumpCharacter.cpp
|
Secondary jump / Heavy Jump : when character has 2 set of jump modes. There are the default jump and the secondary jump (which usually is higher than the default jump)
Rikimaru and Ayame from Tenchu 2 use secondary jump mechanism.
pure Blueprint
In pure blueprint this jump mechanic is made in SecondaryJump
blueprint component, which is the child of JumpMechanic
blueprint component.
Below is character example using SecondaryJump
:
example use in video :
KallariAnimBP_SecondaryJump
+
KallariCharBP_SecondaryJump
outside repo dependencies: Paragon: Kallari
Implementation example of SecondaryJump
inside character blueprint:
pure C++
In pure C++, this jump mechanic is in SecondaryJumpCharacter.cpp
,
which is the child of third person character C++ template. Additional player input is needed,
in here I am using Shift.
class member declaration
secondary jump logic :
add player input Shift in GameInput.ini
:
+ActionMappings=(ActionName="SecondaryInput",Key=LeftShift,bShift=False,bCtrl=False,bAlt=False,bCmd=False)
Jump then Glide
pure Blueprint |
JumpMechanic
►
JumpThenGlide
|
pure C++ |
JumpThenGlideCharacter.h
+
JumpThenGlideCharacter.cpp
|
Jump then glide: character able to glide in the air after jump. In this jump mechanic, the glide is achieved throu changing GravityScale
after character has reached jump apex ( if the player hold the Space key ). GravityScale
is changed to smaller value, but still GravityScale
> 0, so if you wanna simulate character that jump with parachute that will have long distance fall, don't use this.
pure Blueprint
In pure blueprint this jump mechanic is made in JumpThenGlide
blueprint component, which is the child of JumpMechanic
blueprint component.
Below is the example of character using JumpThenGlide
:
example use in video :
MurielAnimBP_GlideJump
+
MurielCharBP_GlideJump
outside repo dependencies: Paragon: Muriel
Implementation example of JumpThenGlide
inside characterBP:
pure C++
In pure C++, this jump mechanic is in SprintJumpCharacter.cpp
,
which is the child of third person character C++ template.
class member declaration:
jump then glide mechanic logic:
MultipleJumps
example use in video :
HowitzerAnimBP_MultipleJumps
+
HowitzerCharBP_MultipleJumps
outside repo dependencies: Paragon: Howitzer
Multiple Jumps : character ability jump in the air, this include double jump, which basically just multiple jump with 2 jumps limit, in the example above it was just JumpMaxCount = 3
.