/nsggp-game

"Not-so-generic Generic Platformer", simple game made for an assignment.

Primary LanguageJavaScriptMIT LicenseMIT

Not-so-generic Generic Platformer

A simple game skeleton built with the Phaser WebGL game engine and the Electron Framework for window management, enabling the use of NodeJS for filesystem access.

Working from source

Setup

Clone the repository and run npm install to install the dependencies.

Structure

  • src/
    • data/
      • scenes/ : Level description files
        • 1.json : Simple (and only) level using all currently implemented features.
        • test.json : Test level, was used for testing, not accessible through normal gameplay.
      • settings/ : Settings files
        • inputs.json : Inputs settings, list of keybindings for each implemented action.
    • game.js : Game logic.
    • index.html : HTML rendered by Electron.
    • index.css : CSS rules used on index.html.
    • index.js : Electron logic (generated by Electron-Forge).
  • out/ (excluded from git) : Exports from npm run package

Running

Run npm run start to launch the game, without building portable versions (i.e. for testing).

Building

Run npm run package to build all the outputs (no signing key).

Note: Will look into restricting which outputs are generated from electron-packager, just struggling with the syntax and parameters.