Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Latest commit

 

History

History
61 lines (34 loc) · 2.61 KB

README.md

File metadata and controls

61 lines (34 loc) · 2.61 KB

arcade-jam-2018

Getting Started

  1. Install Yarn
  2. yarn install to install dependencies to your machine (You can also just run yarn for this)
  3. yarn start to start running the thing

Working within Electron

  • You can get to a console w/ error output via View -> Toggle Developer Tools (Ctrl+I on Windows, might actually be Ctrl+Shift+I)
  • You can reload to pick up new changes from View -> Reload or View -> Force Reload (both Ctrl+R on Windows)

Adding new components or states

Creating a new Prefab

Prefabs are great for encapsulating things like a sprite with behavior, or some text that you want to update separately. To make a new one, run

yarn phaser:prefab

Creating a new Shader

These are black magic. They run on the graphics card to mutate or create what's rendered. Would not recommend for a game jam but here's the command nonetheless. To create a new one, run

yarn phaser:shader

Creating a new State

Ideally we don't need any of these in a game jam, but if you do decide we need a new state somewhere between src/states/game.js and src/states/gameover.js, you can get one by running

yarn phaser:state

After doing this, you'll need to edit src/main.js to register the state so it can be navigated to.

If you do this thing, for the Arcade Jam, you need to add an init method to the state that binds quit so the player can always exit our game.

Relevant API docs

We're using Phaser Community Edition (CE) 2.11. This is a community continuation of Phaser 2, which officially ended at 2.6.2.

We should have both Arcade Physics and P2 Physics installed and available for use. Arcade only works with non-rotated squares, P2 is more flexible but slower.

All of the Phaser CE docs are for latest version only, so if this project gets outdated, you may be misled.

Older but still useful

Shader-specific

Additional random notes

Electron doesn't seem to support some of the newer ES6/7/8 syntaxes, and I'm too lazy to put a transpiler in here just yet. If something new and fancy doesn't work, try making it old and busted.