Code Monkey home page Code Monkey logo

chronoblaster's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.