Skip to content
/ wahid Public

A CreateJS-compatible library for games

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.txt
Unknown
LICENSE.js
Notifications You must be signed in to change notification settings

DeNADev/wahid

Repository files navigation

Wahid

A CreateJS-compatible library for games

Documentation

Building Wahid

Wahid consists of lots of JavaScript files and it assumes a game includes a compiled file instead of including all JavaScript files. This library needs a PC (or a Mac) having the following tools installed to build it from its source files:

(This repository includes a copy of Closure Compiler and you do not have to install it.)

To build this library from its source files on your PC (or your Mac), clone this repository and run make on the command line as listed below.

# git clone https://github.com/DeNADev/wahid.git
# cd wahid
# make

IMPORTANT NOTICE

This library uses unsecure communication between a game page and an <iframe> page to play sounds in the background by default, i.e. malicious JavaScript code in the game page can also send messages to the <iframe> page to control sounds. If a game has to use this library with untrusted JavaScript libraries, compile this library with a 'USE_FRAME=false' option to prohibit using the <iframe> page as listed below.

# git clone https://github.com/DeNADev/wahid.git
# cd wahid
# make USE_FRAME=false

Contributing Code

Contributions to this project is welcome. Especially, it is definitely welcome for you to Submit bug reports or Submit pull requests.

We appreciate your bug reports and pull requests. On the other hand, this library is used by games and we MUST fix bugs without regressions for them. (Changes to this repository will be merged into games sooner or later.) To avoid regressions, we may mark your bug reports as WILL NOT FIX. (As written in Inside wahid, we have many compatibility issues that are not so easy to fix without losing speed or increasing memory consumption.)

We in general follows Google JavaScript Style and we would encourage contributors to follow its rules when making their changes. Nevertheless, we override some rules and add more.

  • Each line should be 80 characters or less.
  • Do not use ECMAScript 2015. (This library must work well on Android devices that do not have ECMAScript 2015 implemented.)
  • Do not use closures. (It is not so easy to use closures without object leaks. Games uses tens of thousands of CreateJS objects and a small leak in this library becomes a huge burden for them.)
  • Do not use try-catch statements. Catching exceptions often hides bigger problems, including game problems.
  • Attach object properties which we do not have to initialize in its constructor to its prototypes. Even though overriding a property on its prototype creates a new hidden class as written in V8 Design Elements, less constructor code makes it faster to create an object.

We would also encourage contributors to build this library without warning or errors before submitting their pull requests. (This library uses advanced compilation and contributors may need greater care to build this library without errors or warnings.)

License

This code is licensed under the MIT License.

About

A CreateJS-compatible library for games

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.txt
Unknown
LICENSE.js

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages