Giter VIP home page Giter VIP logo

kf-game-engine's Introduction

#Kf Game Engine

Another JS game engine using pixijs as a rendering enginge. It provides helper utilities to load wasm (rust or c++) as main game logic.

Api Documentation coming soon.

##C++ (recommended) Install emscripten emsdk and em++.

Copy code build into public folder for example if using create react app (refer to create react app docs), and import js file.

em++ ./src/Game.cpp --source-map-base localhost:3000 -O0 -g4 --emit-symbol-map -s WASM=1 -o build/game-wasm.js

##Rust Usage: During the development of the engine, it was hard to incorporate webpack using wasm_bindgen. Therefore, it is recommended to use the browser - no es6 modules build.

###Example Have rust code build into public folder for example if using create react app (refer to create react app docs), and import js file.

wasm-pack build --target no-modules
rm ./pkg/battle_rust.d.ts
rm ./pkg/battle_rust_bg.d.ts
cp -rf ./pkg/* ../js/public/game-wasm/

Load this script after you load the wasm file in index.html

// the `wasm_bindgen` global is set to the exports of the Rust module
// we'll defer our execution until the wasm is ready to go
function run(mod) {
  window.wasm = mod;
  window.wasmLoaded = true;
  const event = new Event('wasm_load');
  document.dispatchEvent(event);
}

window.wasm_bindgen('game-wasm/battle_rust_bg.wasm').then(run);

This will dispatch an event to the game engine, for the game engine to register the correct handlers in wasm.

import engine from @kf/game-engine;
engine.start(config.game, mainGameViewRef, storeFn(store), assetDicts);

##Character Concepts

Sprite: Actual Sprite entity CharType: A type of character that includes sprites and traits A entity shoudl be created using a character factory to create a particular type of char Character: A playable entity that is a character type with sprite and pos attributes

You will need to define a characterdict, use createCharacters(config, charFactoryDict)

For use development use locally in other libraries:

lerna bootstrap --npm -client=yarn lerna link yarn in each package

yarn link package in dependent project

kf-game-engine's People

Contributors

arcq avatar

Watchers

 avatar

kf-game-engine's Issues

[DepShield] (CVSS 5.3) Vulnerability due to usage of kind-of:4.0.0

Vulnerabilities

DepShield reports that this application's usage of kind-of:4.0.0 results in the following vulnerability(s):


Occurrences

kind-of:4.0.0 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ chokidar:2.1.6
              └─ braces:2.3.2
                    └─ snapdragon:0.8.2
                          └─ base:0.11.2
                                └─ cache-base:1.0.1
                                      └─ has-value:1.0.0
                                            └─ has-values:1.0.0
                                                  └─ kind-of:4.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.set:4.3.2

Vulnerabilities

DepShield reports that this application's usage of lodash.set:4.3.2 results in the following vulnerability(s):


Occurrences

lodash.set:4.3.2 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/version:3.15.0
              └─ @lerna/github-client:3.14.2
                    └─ @octokit/rest:16.28.3
                          └─ lodash.set:4.3.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of minimist:1.2.0

Vulnerabilities

DepShield reports that this application's usage of minimist:1.2.0 results in the following vulnerability(s):


Occurrences

minimist:1.2.0 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ chokidar:2.1.6
              └─ fsevents:1.2.9
                    └─ node-pre-gyp:0.12.0
                          └─ rc:1.2.8
                                └─ minimist:1.2.0

@babel/core:7.5.4
        └─ json5:2.1.0
              └─ minimist:1.2.0

lerna:3.15.0
        └─ @lerna/create:3.15.0
              └─ @lerna/child-process:3.14.2
                    └─ strong-log-transformer:2.1.0
                          └─ minimist:1.2.0
        └─ @lerna/version:3.15.0
              └─ @lerna/conventional-commits:3.14.0
                    └─ conventional-changelog-core:3.2.2
                          └─ get-pkg-repo:1.4.0
                                └─ meow:3.7.0
                                      └─ minimist:1.2.0
                    └─ conventional-recommended-bump:4.1.1
                          └─ meow:4.0.1
                                └─ minimist:1.2.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.get:4.4.2

Vulnerabilities

DepShield reports that this application's usage of lodash.get:4.4.2 results in the following vulnerability(s):


Occurrences

lodash.get:4.4.2 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/version:3.15.0
              └─ @lerna/github-client:3.14.2
                    └─ @octokit/rest:16.28.3
                          └─ lodash.get:4.4.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 5.3) Vulnerability due to usage of kind-of:3.2.2

Vulnerabilities

DepShield reports that this application's usage of kind-of:3.2.2 results in the following vulnerability(s):


Occurrences

kind-of:3.2.2 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ chokidar:2.1.6
              └─ braces:2.3.2
                    └─ fill-range:4.0.0
                          └─ is-number:3.0.0
                                └─ kind-of:3.2.2
                    └─ snapdragon:0.8.2
                          └─ base:0.11.2
                                └─ cache-base:1.0.1
                                      └─ to-object-path:0.3.0
                                            └─ kind-of:3.2.2
                                └─ class-utils:0.3.6
                                      └─ static-extend:0.1.2
                                            └─ object-copy:0.1.0
                                                  └─ kind-of:3.2.2
                          └─ define-property:0.2.5
                                └─ is-descriptor:0.1.6
                                      └─ is-accessor-descriptor:0.1.6
                                            └─ kind-of:3.2.2
                                      └─ is-data-descriptor:0.1.4
                                            └─ kind-of:3.2.2
                    └─ snapdragon-node:2.1.1
                          └─ snapdragon-util:3.0.1
                                └─ kind-of:3.2.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.sortby:4.7.0

Vulnerabilities

DepShield reports that this application's usage of lodash.sortby:4.7.0 results in the following vulnerability(s):


Occurrences

lodash.sortby:4.7.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/create:3.15.0
              └─ whatwg-url:7.0.0
                    └─ lodash.sortby:4.7.0
        └─ @lerna/version:3.15.0
              └─ @lerna/gitlab-client:3.15.0
                    └─ whatwg-url:7.0.0
                          └─ lodash.sortby:4.7.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of debug:2.6.9

Vulnerabilities

DepShield reports that this application's usage of debug:2.6.9 results in the following vulnerability(s):


Occurrences

debug:2.6.9 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ chokidar:2.1.6
              └─ anymatch:2.0.0
                    └─ micromatch:3.1.10
                          └─ extglob:2.0.4
                                └─ expand-brackets:2.1.4
                                      └─ debug:2.6.9
              └─ braces:2.3.2
                    └─ snapdragon:0.8.2
                          └─ debug:2.6.9

eslint-import-resolver-node:0.3.2
        └─ debug:2.6.9

eslint-plugin-import:2.18.0
        └─ debug:2.6.9
        └─ eslint-module-utils:2.4.0
              └─ debug:2.6.9

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 5.3) Vulnerability due to usage of kind-of:5.1.0

Vulnerabilities

DepShield reports that this application's usage of kind-of:5.1.0 results in the following vulnerability(s):


Occurrences

kind-of:5.1.0 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ chokidar:2.1.6
              └─ braces:2.3.2
                    └─ snapdragon:0.8.2
                          └─ define-property:0.2.5
                                └─ is-descriptor:0.1.6
                                      └─ kind-of:5.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of q:1.5.1

Vulnerabilities

DepShield reports that this application's usage of q:1.5.1 results in the following vulnerability(s):


Occurrences

q:1.5.1 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/version:3.15.0
              └─ @lerna/conventional-commits:3.14.0
                    └─ conventional-changelog-angular:5.0.3
                          └─ q:1.5.1
                    └─ conventional-changelog-core:3.2.2
                          └─ q:1.5.1
                    └─ conventional-recommended-bump:4.1.1
                          └─ q:1.5.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of kind-of:6.0.2

Vulnerabilities

DepShield reports that this application's usage of kind-of:6.0.2 results in the following vulnerability(s):


Occurrences

kind-of:6.0.2 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ chokidar:2.1.6
              └─ anymatch:2.0.0
                    └─ micromatch:3.1.10
                          └─ define-property:2.0.2
                                └─ is-descriptor:1.0.2
                                      └─ is-accessor-descriptor:1.0.0
                                            └─ kind-of:6.0.2
                                      └─ is-data-descriptor:1.0.0
                                            └─ kind-of:6.0.2
                                      └─ kind-of:6.0.2
                          └─ extglob:2.0.4
                                └─ define-property:1.0.0
                                      └─ is-descriptor:1.0.2
                                            └─ is-accessor-descriptor:1.0.0
                                                  └─ kind-of:6.0.2
                                            └─ is-data-descriptor:1.0.0
                                                  └─ kind-of:6.0.2
                                            └─ kind-of:6.0.2
                          └─ kind-of:6.0.2
                          └─ nanomatch:1.2.13
                                └─ kind-of:6.0.2
              └─ braces:2.3.2
                    └─ snapdragon:0.8.2
                          └─ base:0.11.2
                                └─ define-property:1.0.0
                                      └─ is-descriptor:1.0.2
                                            └─ is-accessor-descriptor:1.0.0
                                                  └─ kind-of:6.0.2
                                            └─ is-data-descriptor:1.0.0
                                                  └─ kind-of:6.0.2
                                            └─ kind-of:6.0.2
                    └─ snapdragon-node:2.1.1
                          └─ define-property:1.0.0
                                └─ is-descriptor:1.0.2
                                      └─ kind-of:6.0.2
                                      └─ is-accessor-descriptor:1.0.0
                                            └─ kind-of:6.0.2
                                      └─ is-data-descriptor:1.0.0
                                            └─ kind-of:6.0.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of yargs-parser:11.1.1

Vulnerabilities

DepShield reports that this application's usage of yargs-parser:11.1.1 results in the following vulnerability(s):


Occurrences

yargs-parser:11.1.1 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/cli:3.13.0
              └─ yargs:12.0.5
                    └─ yargs-parser:11.1.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of https-proxy-agent:2.2.2

Vulnerabilities

DepShield reports that this application's usage of https-proxy-agent:2.2.2 results in the following vulnerability(s):


Occurrences

https-proxy-agent:2.2.2 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/add:3.15.0
              └─ @evocateur/pacote:9.6.0
                    └─ make-fetch-happen:4.0.2
                          └─ https-proxy-agent:2.2.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.clonedeep:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.clonedeep:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.clonedeep:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/publish:3.15.0
              └─ @lerna/npm-publish:3.15.0
                    └─ @evocateur/libnpmpublish:1.2.0
                          └─ lodash.clonedeep:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash._reinterpolate:3.0.0

Vulnerabilities

DepShield reports that this application's usage of lodash._reinterpolate:3.0.0 results in the following vulnerability(s):


Occurrences

lodash._reinterpolate:3.0.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/version:3.15.0
              └─ @lerna/conventional-commits:3.14.0
                    └─ conventional-changelog-core:3.2.2
                          └─ git-raw-commits:2.0.0
                                └─ lodash.template:4.5.0
                                      └─ lodash._reinterpolate:3.0.0
                                      └─ lodash.templatesettings:4.2.0
                                            └─ lodash._reinterpolate:3.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.uniq:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.uniq:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.uniq:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/version:3.15.0
              └─ @lerna/github-client:3.14.2
                    └─ @octokit/rest:16.28.3
                          └─ lodash.uniq:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of minimist:0.0.8

Vulnerabilities

DepShield reports that this application's usage of minimist:0.0.8 results in the following vulnerability(s):


Occurrences

minimist:0.0.8 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ chokidar:2.1.6
              └─ fsevents:1.2.9
                    └─ node-pre-gyp:0.12.0
                          └─ mkdirp:0.5.1
                                └─ minimist:0.0.8
        └─ mkdirp:0.5.1
              └─ minimist:0.0.8

lerna:3.15.0
        └─ @lerna/version:3.15.0
              └─ @lerna/conventional-commits:3.14.0
                    └─ conventional-changelog-core:3.2.2
                          └─ conventional-changelog-writer:4.0.6
                                └─ handlebars:4.1.2
                                      └─ optimist:0.6.1
                                            └─ minimist:0.0.8

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of eslint-utils:1.3.1

Vulnerabilities

DepShield reports that this application's usage of eslint-utils:1.3.1 results in the following vulnerability(s):


Occurrences

eslint-utils:1.3.1 is a transitive dependency introduced by the following direct dependency(s):

eslint:5.16.0
        └─ eslint-utils:1.3.1

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 8.8) Vulnerability due to usage of handlebars:4.1.2

Vulnerabilities

DepShield reports that this application's usage of handlebars:4.1.2 results in the following vulnerability(s):


Occurrences

handlebars:4.1.2 is a transitive dependency introduced by the following direct dependency(s):

lerna:3.15.0
        └─ @lerna/version:3.15.0
              └─ @lerna/conventional-commits:3.14.0
                    └─ conventional-changelog-core:3.2.2
                          └─ conventional-changelog-writer:4.0.6
                                └─ handlebars:4.1.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash:4.17.14

Vulnerabilities

DepShield reports that this application's usage of lodash:4.17.14 results in the following vulnerability(s):


Occurrences

lodash:4.17.14 is a transitive dependency introduced by the following direct dependency(s):

@babel/cli:7.5.0
        └─ lodash:4.17.14

@babel/core:7.5.4
        └─ @babel/generator:7.5.0
              └─ lodash:4.17.14
        └─ @babel/traverse:7.5.0
              └─ lodash:4.17.14
        └─ @babel/types:7.5.0
              └─ lodash:4.17.14
        └─ lodash:4.17.14

@babel/preset-env:7.5.4
        └─ @babel/plugin-proposal-unicode-property-regex:7.4.4
              └─ @babel/helper-regex:7.4.4
                    └─ lodash:4.17.14
        └─ @babel/plugin-transform-block-scoping:7.4.4
              └─ lodash:4.17.14
        └─ @babel/plugin-transform-classes:7.4.4
              └─ @babel/helper-define-map:7.4.4
                    └─ lodash:4.17.14
        └─ @babel/plugin-transform-modules-amd:7.5.0
              └─ @babel/helper-module-transforms:7.4.4
                    └─ lodash:4.17.14

eslint:5.16.0
        └─ inquirer:6.5.0
              └─ lodash:4.17.14
        └─ lodash:4.17.14
        └─ table:5.4.1
              └─ lodash:4.17.14

eslint-plugin-import:2.18.0
        └─ lodash:4.17.14

lerna:3.15.0
        └─ @lerna/add:3.15.0
              └─ @lerna/command:3.15.0
                    └─ lodash:4.17.14
        └─ @lerna/version:3.15.0
              └─ @lerna/conventional-commits:3.14.0
                    └─ conventional-changelog-core:3.2.2
                          └─ conventional-changelog-writer:4.0.6
                                └─ lodash:4.17.14
                          └─ conventional-commits-parser:3.0.3
                                └─ lodash:4.17.14
                          └─ lodash:4.17.14

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.