A sample 2D pixel platformer for Defold that goes beyond the basic Defold tutorials. It showcases a variety of platforms, traps, and basic enemies, and demonstrates how to build a clean, maintainable player controller using the Stately finite state machine library.   The game also demonstrates how to implement basic UI screens and handle input from keyboard, controller and mouse.

Source code
https://github.com/richardnheck/defold-example-platformer

The game  consists of three small levels. It can be played with a keyboard or game controller.

Level 1 — platforming basics
  • Platforms: Horizontal/Vertical Moving platform, Falling platform, Rotating platform, Spring
  • Traps: Spikes
Level 2 — traps
  • Platforms: Conveyor belt, Falling platform, Spring
  • Traps: Triggered Fire, Swinging/Rotating spiked ball,
  • Enemies: Rock head (patroller)
Level 3 — enemies
  • Traps: Path following Saw, Cannon, Trigger Bomb
  • Enemies: King Pig (chaser), Pig (patroller), Pig in box (jumping patroller)

Artwork

By Pixel Frog

Sound and Music

Music

https://tallbeard.itch.io/three-red-hearts-prepare-to-dev

Sound Effects

Most sound effects generated by this cool tool https://www.bfxr.net/

Code

The skeleton game code (menus, scene switching, HUD, level loading) is based on def-shell by Ben James, though I have made numerous changes to remove unecessary logic from the player controller. I have also incorporated some coding structure and elements from defold-daabbcc-example-platformer.

Check out Ben James' GitHub — it's a wealth of high-quality, well-documented Defold examples, templates and game jams.

Published 20 days ago
StatusReleased
PlatformsHTML5
AuthorParabol Ink
AI DisclosureAI Assisted, Code

Leave a comment

Log in with itch.io to leave a comment.