Skip to content

My submission to Gamedev.ja Jam 2023: 2d platformer where player can control time

License

Notifications You must be signed in to change notification settings

ovk/chronoblaster

Repository files navigation

Play on Itch.io

Chrono Bender is a 2D paltformer game made in just under two weeks for Gamedev.js 2023 Jam. The theme of the jam was "time" and the main game mechanics revolves around creating time anomalies that slow or stop the time. The game was built using Phaser 3 engine.

Disclaimer

Since this code was written under severe time constraints, it clearly doesn't represent how you should write and structure your game code. Game mechanics were also changed quite a bit during development, which only added to code inconsistencies and some duplication. It was also my first time using Phaser 3, so I'm sure many things could be done cleaner and more efficiently.

Nevertheless, I hope the code still could be useful to some. I had lot of fun working on the game and was pleasantly surprised by the Phaser 3 capabilities and the ease of use.

Building and Running

First, download and install latest stable version of Node.js, if you don't have it already.

  • Install dependencies with npm install command.
  • To lint code, use npm run lint command.
  • To build and serve in development mode (with hot reloading) run npm run dev command.
  • To build distribution package, run npm run build.

Debug Modes

There are few ways to help debugging the game:

  • To enable physics debug drawing, set debug: true in config.ts file.
  • To enable debug overlay with scene states, set debug = true in Overlay.ts file.
  • To enable debug drawing for tilemap, uncomment this.world.enableDebug(); line in Game.ts file.
  • To enable debug drawing of turret line of sight, uncomment all commented lines with lineOfSightDebug variable in Game.ts file.

Editing Levels

Levels for the game are created/edited with amazing open-source tool Tiled. You can open Tiled project in assets/levels and browse existing levels, to get general idea of how they structured. Layer and property names should be pretty self-explanatory, and you can always look at initTilemap() method in World.ts file.

Moving platforms are created via either path (for a platform going back and forth) or polygon (for a platform following a loop).

New levels should be exported to public/assets/levels and named sequentially.

Assets

I'm not an artist, so while few images/sounds I made myself, most of the art for the game was based on existing assets.

Please note, that most of these assets were edited/altered to better fit into the game style.

About

My submission to Gamedev.ja Jam 2023: 2d platformer where player can control time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages