dok-gamelib

1.0.22 • Public • Published

dok-gamelib

npm version

Dok game library.

Create Release gh-pages

To build a game, add files to game folder:

  • config.json Set basic information such as:

    • title
    • description
  • assets Add images to assets folder. Those will be combined into a single spritesheet.

  • scenes Add js files to the scenes folder.

SceneManager.add(Class, config);

Class: Pass a javascript class as the first parameter, extending the Game class. That class will be instantiated as new Class().

config: The config will get processed and assigned to the class. For the schema of config, see schema.json

Documentation in progress. Meanwhile, check out the sample projects: https://jacklehamster.github.io/dok-gamelib

  • For each scene, you can see the code by clicking EDITOR
  • The code shown is all the code needed to produce a scene (excluding the code for the engine itself).

Scene file structure

game
├── game.json
│   scenes
│   ├── <scene-name>
│   |   ├── start.js
│   │   ├── assets
│   |   │   ├── *.png
│   |   │   ├── *.jpg

Deploy

Deploy

Game produced: https://jacklehamster.github.io/dok-gamelib/archive/game.zip

Dependents (0)

Package Sidebar

Install

npm i dok-gamelib

Weekly Downloads

0

Version

1.0.22

License

ISC

Unpacked Size

5.28 MB

Total Files

168

Last publish

Collaborators

  • vincentlequang