I started working on a side-scrolling combat platformer prototype in Godot 4. I’m regularly downloading new snapshots of Godot 4 beta which sometimes introduces breaking API changes, but I hope it will be worth it when it finally gets released.

Combat platformer demo: warrior runs, jumps and slashes a slime

I managed to port most of my code for character control/animation from an older project. But it was top-view, so I still had to work more to get running and jumping to work.

The biggest issue I had with physics was a regression on move_and_slide (see this issue). Otherwise, I’d say Godot’s built-in classes made it pretty simple. I don’t have any custom raycasts in my code so far.

So far I implemented the following features for the player character:

  • move and jump
  • melee attack: can chain up to two slashes
  • health system: get hurt and die

I’d like to make this open source, but as it contains some copyrighted third-party assets (although free). I may extract the scripts into some public submodule (as with my Unity projects) though, so stay tuned!

Assets used: