Its API is modeled after the successful PyGame library http://pygame.org.
file. Go to the GameJs directory and execute this in a unix shell or in
examples/skeleton/ directory for a minimal GameJs app. We recommend
you also use this as the scaffolding if you want to create a new game yourself.
Note that you need to run the examples via
unless you use Firefox or Safari. One trivial, cross-plattform solution to serve
a directory via http is this executable: http://code.google.com/p/mongoose/.
compress to optionally minify the resulting JS file.
This will produce one file
gjs-app-wrapped.js holding all GameJs modules as
well as your application code. You can then remove the
<script> lines loading
yabble & gamejs-wrapped and should instead only load the
docs folder of your GameJs installation.
Example application can be found in the
GameJs modules (usually called
gamejs-wrapped.js). This is what all the examples
Thus if you modify the files below
./lib your changes won't show up in the
examples. You have two options to hack on GameJs:
- rebundle the files with the
- directly use the unbundled library files
<script> line including
gamejs-wrapped.js from your
index.html and instead create symbolic links of
./lib into your applications
Your application should now transparently load the single modules instead of the bundle.
We use QUnit https://github.com/jquery/qunit for the GameJs unit tests. Execute
them by opening
This bash file will take care of rewriting the documentation into