Skip to content
Phaser library of common gameplay scripts
TypeScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
package-lock.json
package.json

README.md

CM Phaser Library

Install

git clone https://github.com/cmr624/cm-phaser-library.git

cd cm-phaser-library && npm i

Overview

This library is intended to be a group of commonly used scripts among Phaser 3 games. It is a work in progress!

Current Features

  • Base sprites (arcade and non-arcade) - allows us to inherit from a base custom sprite that adds to the scene and contains a reference to the scene.

  • UI gameobjects - draggables,

  • Input features - such as a simplified WASD arrow keys system and the StandardInput class which gives us up/down/left/right.

  • Tween features - "feedback" tweens which prevents tweens on interactive objects from being triggered more than once, "tween chain" object which takes an array of tweens and executes them one after another, and other basic tweens (scale tweens, etc.)

  • Text features - define commonly used Phaser text styles

  • Graphic sprites - sprites that are drawn using Phaser's 'graphics' library. This basically allows us to draw our shapes instead of loading them at runtime, which could help with building small throwaway objects that we don't want to import a png for.

  • Gameplay implementations - Top Down Player movement, WASD movement, move to cursor, damageable class.

TODO

  • Base Arcade Sprite
  • Base Sprite
  • Base Container
  • Keyboard Input Classes
  • Text style types
  • Tweens
    • Feedback tweens (disallow them to be pressed while tween is active)
    • Regular tweens (scale, color (?))
    • Tween chaining
  • Graphics Drawing Sprites
  • Arcade sprite with move to cursor
  • WASD Top Down Movement
  • Damageable
  • Sprite move towards angle (any vec2)
  • Base Matter Sprite (?)
  • UI Scene (above base scene)
  • Popups
  • Text objects
  • RexUI implementation
  • Pause menu
  • Global sound menu (with options for music / sfx volume)
You can’t perform that action at this time.