Skip to content

FlavioFS/godot-platformer-state-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

[Godot] Platformer Player FSM

A Player state machine demo in Godot.

Preview image failed to load!

Features

  • Edge jump tolerance (jump button press)
  • Floor anticipation (jump button press)
  • One-way platforms
  • 6 states

How does it work?

The player finite state machine (aka. PlayerFSM) switches among 6 states:

Those states inherit from BasePlayerState and the machine is controlled by PlayerFSM.

The player itself (Player.gd), which is a KinematicBody2D node, runs the PlayerFSM every frame.

Extra - Skin selector

Through the tool keyword, it is possible to change player skin before runtime, within the engine editor:

The skins are located in the skins directory.

Preview image failed to load!

About

A Player state machine demo in Godot.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published