0.1.9 • Published 7 days ago

pixi-rainman-game-engine v0.1.9

Weekly downloads
-
License
ISC
Repository
github
Last release
7 days ago

RainMan pixi game engine

This repository contains all of the mechanics that used in rainMan games. This library uses pixi and pixi-spine as dependencies.

Scripts

  1. To build library
    yarn build
  2. To build library during development

     yarn dev:build

    Modifying css files does not automatically reload server, after each change manual restart is needed.

    To have live updates in one of the games, link is recommended:

    yarn dev:link

    After that you can use following command in one of the games. If there will be problems or the changes will not reflect in the game, uninstalling npm package may be needed.

    yarn remove pixi-rainman-game-engine
    npm link pixi-rainman-game-engine

    By using package from npm, in vite optimizeDeps you must exclude this package, but must include each package that throws error in the console. This is probably due to problem with excluding commonJS dependencies. An example is below.

    defineConfig({
        optimizeDeps: {
            include: [
                "ts-money",
                "adaptive-scale/lib",
                "stats.js",
                "url",
                "eventemitter3",
                "earcut",
                "react",
                "react-dom",
                "use-sync-external-store/shim",
                "classnames",
                "react-is",
                "react-custom-scroll",
                "react-dom/client",
            ],
            exclude: ["pixi-rainman-game-engine"],
        },
    });

    For each error in the console, e.g.:

    Uncaught SyntaxError: The requested module '/node_modules/eventemitter3/index.js?v=ec22a584' does not provide an export named 'default'

    you must include it in the optimizeDeps.include array. Typically it is the name after /node_modules/.

    On the other hand, when linking package with npm link, the whole optimizeDeps.include an optimzieDeps.exclude should be commented out.

  3. Lint project

    npm run lint

Game engine structure

Code for the game engine contains in the src directory. For create an feature you should add new directory into src directory. For example: freeSpins and in this folder contains all of the mechanics.

In utils directory there all of the utility functions and types.

Test environment

To simulate behavior of game engine mechanics, this repository contains react-pixi app, where you can test features that are included in game engine. Test environment uses local built of game engine. To setup test environment go to README of test environment.

0.1.9

7 days ago

0.1.8

20 days ago

0.1.7

20 days ago

0.1.6

25 days ago

0.1.5

1 month ago

0.1.2

1 month ago

0.1.1

1 month ago

0.1.4

1 month ago

0.1.3

1 month ago

0.1.0

1 month ago

0.0.6

2 months ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago