Giter Site home page Giter Site logo

devkit's Introduction

The Game Closure DevKit

HTML5 JavaScript game development kit. Run in your browser; build to iOS and Android.

devkit

Installation

OS X

DevKit requires that you install few dependencies first:

We recommend using brew to install these if you do not have them already.

Optional Dependencies

Building games for iOS or Android requires installing the corresponding SDKs:

  • Xcode - required for building games for iOS
  • Android SDK - required for building games for Android
  • Android NDK - required for building games for Android
  • Ant - required for building games for Android

NOTE: please ensure the apache build tools and ant are available in your path so DevKit can find them when trying to build!

Getting Started

Now, install devkit. You may run into some weird errors if you don't own your global node_modules folder.

npm install -g devkit

Linux

Follow the instructions on the project wiki

Windows

Windows platform is supported thanks to WSL. Please follow the official WSL installation guide if you do not have it installed yet, and then our Linux install instructions.

Creating your first game

You need a shortname for your game. The shortname should start with a letter and contain only letters and numbers. For this example, we'll use the shortname of mygame.

  1. Run devkit init mygame to create the mygame folder and install the dependencies.
  2. Run devkit serve to start the simulator
  3. Navigate to http://localhost:9200 and select your game. Press the simulate button on the top right. You should now see your game running in the web simulator!
  4. Open mygame/src/Application.js and start coding!

Building on Device

First, ensure you have the proper pre-requisites installed and on your path for the target device. See above for more details.

DevKit can create builds by specifying a build type (debug or release) and a build target (default options: native-android, native-ios, browser-desktop, browser-mobile). Debug builds include all the logs, do not strictly verify everything, and allow debugging on device via the native inspector. Release builds strip logs and try to verify as much as possible.

All your builds will be available in your /build/ folder.

Android

Building for native-android will create an apk directly.

devkit debug native-android
devkit release native-android

Pro-Tip: You can add the --install flag to automatically install the apk on the connected device, or the --open flag to install and open it.

iOS

Building for native-ios will create an xcode project and open it with xcode. Attach your device and click build.

devkit debug native-ios
devkit release native-ios

Debugging on Device

As of DevKit2, the Native Inspector is no longer packaged with DevKit itself. To debug on device, you need to clone and run the NativeInspector(https://github.com/gameclosure/nativeinspector).

git clone [email protected]:gameclosure/nativeinspector
cd nativeinspector
node NativeInspector.js

Ensure your device is plugged in, then point your browser to localhost:9220 (or whatever the NativeInspector console suggests). Now, when you run a debug build on a connected device you will be able to use the in browser debugger just like when running the simulator.

Migrating a DevKit1 Game to DevKit2

Please check docs.gameclosure.com for the latest migration instructions from DevKit1 to DevKit2. If your existing DevKit1 game has no additional dependencies, you can install DevKit2 by navigating to the top of the game directory and running the following command:

devkit install

This will install the default dependencies and add your game to the DevKit2 simulator. If your app requires additional modules, please see the section about migrating addons and follow the online app migration instructions.

Updating the DevKit

DevKit consists of two parts: the command-line interface (the CLI, devkit) and the API running in your game.

To update the API in your game, run devkit upgrade from inside your game's directory.

Game Modules

All dependencies (modules) for your game live in the modules/ folder of your game. Initially, DevKit games have only one dependency, devkit-core. You can install additional modules to enable functionality in your game such as analytics or accelerator support.

To install a module:

  • Open a terminal and navigate to your game's directory
  • devkit install devkit module's git repository URL

NOTE: be sure you have an updated version of your module that supports DevKit2 (an easy check is that DevKit2 modules require a package.json file). Migrating DevKit1 modules to support DevKit2 is fairly simple - get the instructions at docs.gameclosure.com to contribute.

Inspecting your apps from the command line

The devkit command can be used to query information about your apps. The commands apps and modules describe the apps and their modules, respectively, that devkit knows about on your system. Both commands take an optional flag --json (or -j) for logging the result to stdout in JSON format.

Example commands:

  • devkit apps: logs a list of all registered apps and basic information about each one
  • devkit apps -s: logs a short list of all registered apps with just their titles, paths, and ids
  • devkit apps --json: logs a long list of apps and all details about them in JSON format
  • devkit modules: shows the version of each module in the current app from the manifest as well as the current version of the module (if it differs)
  • devkit modules --save-current: updates an app's dependencies in the app manifest to reflect the current git version for each module on the file system
  • devkit modules devkit-core --save-current: same as above, but only for the devkit-core module

devkit's People

Contributors

andrewriehm avatar collingreen avatar dem3trio avatar derekburch avatar fairfieldt avatar heilhead avatar jsdevlover avatar jwilm avatar lunarraid avatar ravitejag avatar rogueskib avatar yofreke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devkit's Issues

hello-world app does not show Hello, World!

Hi I installed the DevKit and ran the hello-world app to see how it works, but the app only showed the splash screen of Game Closure and did not show the words" Hello, Worlds!" as it should in your guide. I enclosed here the screenshots of the simulator that ran the hello-world app in Chrome and the Terminal screen that showed how the app was built after being connected to server. Can you please let me know what has gone wrong?
Screen Shot 2013-02-18 at 2 18 22 AM

Screen Shot 2013-02-18 at 2 18 35 AM

Error installing devkit (Error: EACCES, symlink)

error Error: EACCES, symlink '/Users/rampr/work/devkit'
error { [Error: EACCES, symlink '/Users/rampr/work/devkit']
error errno: 3,
error code: 'EACCES',
error path: '/Users/rampr/work/devkit' }
error Please try running this command again as root/Administrator.
error System Darwin 12.2.0
error command "node" "/opt/local/bin/npm" "link" "--local"
error cwd /Users/rampr/work/devkit
error node -v v0.8.6
error npm -v 1.1.48
error path /Users/rampr/work/devkit
error code EACCES
error errno 3
error stack Error: EACCES, symlink '/Users/rampr/work/devkit'

Any pointers on why I'm doing wrong? I'm not using sudo and I've chowned the dir as given in the guides

EACCES error during ./install.sh

Hi,
I know you mainly focus on OSX, anyway I am trying to install devkit on Ubuntu 12.10 (64bit), but I get this error during an installation process.

โžœ  devkit git:(master) ./install.sh                      
-{{{> Game Closure SDK
Installing...

Initializing GC SDK libraries ...
Synchronizing submodule url for 'lib/NativeInspector'
Synchronizing submodule url for 'lib/gcapi'
Synchronizing submodule url for 'lib/jsio'
Synchronizing submodule url for 'lib/squill'
Synchronizing submodule url for 'lib/timestep'
Synchronizing submodule url for 'projects/whack-that-mole'
Submodule 'lib/NativeInspector' () registered for path 'lib/NativeInspector'
Submodule 'lib/gcapi' () registered for path 'lib/gcapi'
Submodule 'lib/jsio' () registered for path 'lib/js.io'
Submodule 'lib/squill' () registered for path 'lib/squill'
Submodule 'lib/timestep' () registered for path 'lib/timestep'
Submodule 'projects/whack-that-mole' () registered for path 'projects/whack-that-mole'
npm ERR! Error: EACCES, symlink '/home/crossbone/git/devkit'
npm ERR!  { [Error: EACCES, symlink '/home/crossbone/git/devkit'] errno: 3, code: 'EACCES', path: '/home/crossbone/git/devkit' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.5.0-23-generic
npm ERR! command "nodejs" "/usr/bin/npm" "link" "--local"
npm ERR! cwd /home/crossbone/git/devkit
npm ERR! node -v v0.8.19
npm ERR! npm -v 1.2.9
npm ERR! path /home/crossbone/git/devkit
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '/home/crossbone/git/devkit'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/crossbone/git/devkit/npm-debug.log
npm ERR! not ok code 0
Error: Linking npm to local
Try running: sudo chown -R $USER /usr/local

When I ran the ./install.sh command with sudo, everything gone well, but basil did not work anyway.. So I guess its not supposed to be run as root... I hope I've provided enough info, if not, just ask... I really want to get this running! :)

Can't Install on Linux Debian 6

Hi guys, I'm installing gameclosure for the first time,

I ran the ./install command but In the end, the installation asks me to authorize a folder to my user, it doesn't solve the problem.

The problem can be solved by installing https://github.com/isaacs/npm from sources

Thank you and keep up the great work ๐Ÿ‘


The installation follows as:

./install.sh

-{{{> Game Closure DevKit
Installing...

Initializing GC DevKit libraries ...
Synchronizing submodule url for 'lib/NativeInspector'
Synchronizing submodule url for 'lib/gcapi'
Synchronizing submodule url for 'lib/jsio'
Synchronizing submodule url for 'lib/squill'
Synchronizing submodule url for 'lib/timestep'
Synchronizing submodule url for 'projects/whack-that-mole'
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/jash
npm http GET https://registry.npmjs.org/stylus
npm http GET https://registry.npmjs.org/falafel/0.0.2
npm http GET https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/falafel/0.0.2
npm http 304 https://registry.npmjs.org/stylus
npm http 304 https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/jash
npm http 304 https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/esprima
npm ERR! Error: EROFS, symlink '../jash/src/bin.js'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Linux 2.6.32-5-686
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/deployer/v-root/games/devkit
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! path ../jash/src/bin.js
npm ERR! code EROFS
npm ERR! errno 56
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/cookie-signature/0.0.1
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/connect/2.7.2
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/send/0.1.0
npm http 304 https://registry.npmjs.org/cookie-signature/0.0.1
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/connect/2.7.2
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/socket.io-client/0.8.7
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/cookie/0.0.5
npm http 304 https://registry.npmjs.org/fresh/0.1.0
npm http 304 https://registry.npmjs.org/socket.io-client/0.8.7
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/diff/1.0.2
npm http GET https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/diff/1.0.2
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/buffer-crc32/0.1.1
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http 304 https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http GET https://registry.npmjs.org/uglify-js/1.0.6
npm http GET https://registry.npmjs.org/websocket-client/1.0.0
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/websocket-client/1.0.0
npm http 304 https://registry.npmjs.org/uglify-js/1.0.6
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http 304 https://registry.npmjs.org/bytes/0.1.0
npm http 304 https://registry.npmjs.org/qs/0.5.1
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/formidable/1.0.11
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/deployer/v-root/games/devkit/npm-debug.log
npm ERR! not ok code 0
Error: Running npm install
Try running: sudo chown -R $USER /usr/local

Can`t extend Timestep`s native Context2D

Hello!
Im trying to add some new methods to Context2D.js wich should allow manipulating raw texture image data. Ive created this.myMethod = function() in Context2D.js, then added some juicy methods to tealeaf_context.c and tealeaf_context.h to call from native ctx in myMethod.
When I create and launch apk for android I still cannot see myMethod while remote debugging.

When building android, shortNames cannot start with number

Due to restrictions on android activity names, and the fact that we use the apps shortName in the activity, if a shortName is prefixed with a number, the android build will fail.

[android] Error: Activity name '5testActivity' contains invalid characters.
[android] Allowed characters are: a-z A-Z 0-9 _

We should look into disallowing shortNames that don't adhere to the android constraints.

Zoom gesture and mouse wheel

Hi,

I'm currently developping a GC plugin to show a map (Open Street Map). Showing and moving the map is ok, but I need a solution to zoom in and out.
Is it possible to manage zoom gesture and mouse wheel event with GC?
Generally, is there a gesture lib for GC?

Of course, I'll open source this plugin when it will be ready.

Thanks!

[docs] Add physics examples

It's fairly easy to do simple physics in JavaScript, and we currently do not have any examples on these topics. Let's write a guide on how to do game physics, and some new examples with pendulums, wavy flags, springs, and rigid body physics!

ui.TextView not displaying text in Mobile Safari

Hello,

It seems TextView does not display any text while rendering in Mobile Safari.
It renders fine in other mode.

import animate;
import ui.StackView as StackView;
import src.GameScreen as GameScreen;
import ui.View as View;
import ui.ImageView as ImageView;
import ui.TextView;

exports = Class(GC.Application, function () {

    this.initUI = function () {

        var rootView = new StackView({
            superview: this,
            x: 0 ,
            y: 0,
            width: device.width ,
            height: device.height,
            clip: true,
            backgroundColor: '#000000'
        });

 this.timerText = new ui.TextView({

        x: 0,
        y: 0,
        width: 400,
        height: 666,
        text: "countdown_secs",
        size: 24,
        shadowColor: '#FFFFFF',
        color: '#FFFFFF'
      });

           rootView.push(this.timerText);

    };

    this.launchUI = function () {};
});

Thanks for any help in advance,

Best

Event InputStart not working properly

I have some ImageView objects and when using the event .on('InputStart') works for some of these objects and not to others.

This warning message appears on the console "Possible EventEmitter memory leak detected. 10 listeners added. Use emitter.setMaxListeners() to increase limit.".

Compile error on 'basil testapp native-android '

I cloned the devkit github repo yesterday (release-0.1.12) and I've just installed Android plugin for basil. It looks like installation went fine.
However if I tried basil testapp native-android, I am getting compile error on jni/js/js_input_prompt.cpp.

Any suggestion?

$ basil testapp native-android
   [testapp]    Launching Test App: native-android
      [make]   android update project -p TeaLeaf --target android-15 --subprojects
      [make]   Updated project.properties
      [make]   Updated local.properties
      [make]   Updated file TeaLeaf/proguard-project.txt
      [make]   android update project -p GCTestApp --target android-15 --subprojects
      [make]   Updated project.properties
      [make]   Updated local.properties
      [make]   Updated file GCTestApp/proguard-project.txt
      [make]   node plugins/installPlugins.js
      [make]   ndk-build -C TeaLeaf -Bj8 RELEASE=0 JSPROF=1 GPROF=0 V8SYMBOLS=0
      [make]   make[1]: Entering directory `/Volumes/Data_HD/Users/kkuwata/Documents/github/devkit/addons/native-android/TeaLeaf'
      [make]    [warn]  /usr/local/Cellar/android-ndk/r8d/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml    

      [make]   Compile++ thumb  : tealeaf <= js_string_cache.cpp
      [make]   Compile++ thumb  : tealeaf <= js_string_cache.cpp
      [make]   Prebuilt       : libpng.a <= jni/lib/
      [make]   Prebuilt       : libjpeg.a <= jni/lib/
      [make]   Prebuilt       : libv8.a <= jni/lib/
      [make]   Prebuilt       : libjansson.a <= jni/lib/
      [make]   StaticLibrary  : libstdc++.a
      [make]   Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
      [make]   Gdbsetup       : libs/armeabi-v7a/gdb.setup
      [make]   Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbserver
      [make]   Gdbsetup       : libs/armeabi/gdb.setup
      [make]   Compile++ thumb  : tealeaf <= js_animate.cpp
      [make]   Compile++ thumb  : tealeaf <= js.cpp
      [make]   Compile++ thumb  : tealeaf <= js_build.cpp
      [make]   Compile++ thumb  : tealeaf <= js_console.cpp
      [make]   Compile++ thumb  : tealeaf <= js_context.cpp
      [make]   Compile++ thumb  : tealeaf <= js_device.cpp
      [make]   Compile++ thumb  : tealeaf <= js_dialog.cpp
      [make]   Compile++ thumb  : tealeaf <= js_events.cpp
      [make]   Compile++ thumb  : tealeaf <= js_gc.cpp
      [make]   Compile++ thumb  : tealeaf <= js_haptics.cpp
      [make]   Compile++ thumb  : tealeaf <= js_input_prompt.cpp
      [make]    [warn]  jni/js/js_input_prompt.cpp: In function 'v8::Handle<v8::Value> js_input_prompt_show(const v8::Arguments&)':
      [make]   jni/js/js_input_prompt.cpp:33:83: error: too many arguments to function 'int input_prompt_show(char const*, char const*, char const*, bool)'
      [make]   jni/core/platform/input_prompt.h:21:5: note: declared here

      [make]    [warn]  make[1]: 
      [make]    [warn]  *** [obj/local/armeabi/objs-debug/tealeaf/js/js_input_prompt.o] Error 1
      [make]   make[1]: *** Waiting for unfinished jobs....

      [make]   make[1]: Leaving directory `/Volumes/Data_HD/Users/kkuwata/Documents/github/devkit/addons/native-android/TeaLeaf'
      [make]    [warn]  make: *** [all] Error 2

      [make]    [error]  (make exited with code 2)
ERROR 2

Permission

sudo chown -R $USER /usr/local

What do I put in user?
What is my user?

Read error during installation

Towards the end of the installation, you get the following question:

Would you like to install the Game Closure DevKit system-wide in /usr/local/bin [N/y] ?./install.sh: line 110: read: read error: 0: Resource temporarily unavailable

I never got a chance to reply, since the error instantly interrupted that process, but I still got the "Successfully installed" message at the end.

I installed devkit in my home directory as myself, not su. System: OSX 10.7.5.

basil testapp native-android: make: *** [install] Error 1

I am using ubuntu 12.10 and after run basil testapp native-android I get this in the terminal:

[testapp] Launching Test App: native-android [make] android update project -p TeaLeaf --target android-15 --subprojects [make] Updated project.properties

after some lines

  [make]   

BUILD SUCCESSFUL
Total time: 10 seconds
[make] ant -f GCTestApp/build.xml installd
[make] Buildfile: /home/jaap/devkit/addons/native-android/GCTestApp/build.xml
[make]
-set-mode-check:
[make]
-set-debug-files:

install:
[make] [echo] Installing /home/jaap/devkit/addons/native-android/GCTestApp/bin/TestAppActivity-debug.apk onto default emulator or device...
[make] [exec] error: protocol fault (no status)
[make] [exec] adb server is out of date. killing...
[make] [exec] * daemon started successfully *
[exec] * daemon not running. starting it now on port 5037 *
[make] [exec] * daemon started successfully *
[make] [exec] rm failed for /data/local/tmp/TestAppActivity-debug.apk, No such file or directory
[make]
[make] BUILD FAILED
[make] /home/jaap/android-sdk-linux/tools/ant/build.xml:1353: The following error occurred while executing this line:
[make] /home/jaap/android-sdk-linux/tools/ant/build.xml:1367: exec returned: 1
[make]
[make] Total time: 9 seconds
[make] make: *** [install] Error 1
(make exited with code 2)
ERROR 2

Something I did wrong?

device.devicePixelRatio does not work on device

Device: Nexus 4
Android version: 4.2.2

I've been working on a game and I'm trying to get some resolution independence using the devicePixelRatio property of device. This works fine in the simulator, and when I select the Galaxy Nexus, devicePixelRatio is 2, and my game is properly scaled up by a factor of 2. However, when I run the game on my Nexus 4 (both through TestApp and a standalone apk build) devicePixelRatio is 1, and therefore the game does not scale up.

Browser centerAnchor is broken

Try basil build browser-desktop with my recent event drag example. They spin around the upper left and ignore the centerAnchor property.

Geolocation

Is it possible to use geolocation with Game Closure? If not, will it be possible in a near future?

Ubuntu tip for install

if [[ $EUID -eq 0 ]]; then
echo "This script should not be run as root" 1>&2
exit 1
fi

change for

if [![ $EUID -eq 0 ]]; then
echo "This script should not be run as root" 1>&2
exit 1
fi

in ubuntu must be as root

Server crash at opening project on iPhone

Server crash after loading project in safari on iPhone 4s (5.1)

reproduce:

install fresh 0.1.18 devkit
run $ basil serve
access server with safari on iPhone
open "platformer" project
...
Server Crash

log:

============================================================
                   {{ Game Closure SDK }}
                       release-0.1.18
                    Needs more ketchup.
------------------------------------------------------------

      [java]    [warn]  java version "1.6.0_18"

      [java]    [warn]  OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze2)
      [java]   OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

starting server, session url is <>
INFO .env.node.csp Listening csp@:9225
INFO .env.node.tcp Listening tcp@:9226
     [basil]    Server launched at http://localhost:9200/

     [basil]    Your local IP is []
    [native]    native inspector exited with code 8
  [jvmtools]    Connected to daemon on localhost:47828

     [build]    Building: debug/browser-mobile
  [packager]    Packaging resources...
      [jsio]    Inferring opts from platform: browser
      [jsio]    Compiling Source code.
      [jsio]    jsio_compile "gc.browser.launchClient" --cwd "/home/user/git/gameclosure/projects/demoMenus" --compressorCachePath "/home/user/git/gameclosure/projects/demoMenus/build/.cache" --printOutput  --defines "{\"BUILD_TARGET\":\"browser-mobile\",\"BUILD_ENV\":\"browser\",\"DEBUG\":true,\"DEV_MODE\":true}" --jsioPath "sdk/jsio" --noIE "true" --environment "browser" --path "[\".\",\"sdk/jsio\",\"sdk/gc/api/\",\"sdk/\",\"sdk/timestep/\"]" --includeJsio "false" --appendImport "false" --debug "4"
WARN preprocessors.compiler could not compile import from sdk/jsio/preprocessors/import.js: ' + p2 + '
WARN preprocessors.compiler could not compile import from sdk/timestep/device.js: 'import ui.backend.' + (exports.useDOM ? 'dom' : 'canvas'
LOG ..__imports__ Including browser runtime.
  [packager]    Not packaging resources from resources/splash
  [packager]    Not packaging resources from resources/icons
  [packager]    Did not package resource resources/splash/portrait2048.png
  [packager]    Did not package resource resources/splash/portrait960.png
  [packager]    Did not package resource resources/splash/portrait1024.png
  [packager]    Did not package resource resources/splash/portrait480.png
  [packager]    Did not package resource resources/splash/landscape1536.png
  [packager]    Did not package resource resources/splash/README.txt
  [packager]    Did not package resource resources/splash/landscape768.png
  [packager]    Did not package the metadata file resources/splash/metadata.json
  [packager]    Did not package resource resources/splash/portrait1136.png
  [packager]    Did not package resource resources/icons/android48.png
  [packager]    Did not package resource resources/icons/icon512.png
  [packager]    Did not package resource resources/icons/ios114.png
  [packager]    Did not package resource resources/icons/ios72.png
  [packager]    Did not package resource resources/icons/ios57.png
  [packager]    Did not package the metadata file resources/icons/metadata.json
  [packager]    Did not package resource resources/icons/android96.png
  [packager]    Did not package resource resources/icons/android72.png
  [packager]    Did not package resource resources/icons/android36.png
  [packager]    Did not package resource resources/icons/ios144.png
  [packager]    Did not package the metadata file resources/fonts/metadata.json
[spritesheetMap]    wrote fontsheetSizeMap.json to /home/user/git/gameclosure/projects/demoMenus/resources/fonts
[spritesheetMap]    wrote spritesheetSizeMap.json to /home/user/git/gameclosure/projects/demoMenus/build/debug/browser-mobile/spritesheets
  [packager]    Finished packaging resources
[build-browser]    Compiling html for browser-mobile
      [jsio]    Compiling Source code.
      [jsio]    jsio_compile "gc.browser.bootstrap.launchBrowser" --cwd "/home/user/git/gameclosure/projects/demoMenus" --compressorCachePath "/home/user/git/gameclosure/projects/demoMenus/build/.cache" --printOutput  --defines "{\"BUILD_TARGET\":\"browser-mobile\",\"BUILD_ENV\":\"browser\",\"DEBUG\":true,\"DEV_MODE\":true}" --jsioPath "sdk/jsio" --noIE "true" --environment "browser" --path "[\".\",\"sdk/jsio\",\"sdk/gc/api/\",\"sdk/\",\"sdk/timestep/\"]" --includeJsio "true" --appendImport "false" --debug "4"
WARN preprocessors.compiler could not compile import from sdk/timestep/device.js: 'import ui.backend.' + (exports.useDOM ? 'dom' : 'canvas'
LOG ..__imports__ Including browser runtime.
[build-browser]    adding font resources/fonts/KatanaRegular.ttf
[build-browser]    adding font resources/fonts/BPReplay.ttf
[build-browser]    built cache.
  [packager]    Building JS config... 1369060413640
  [packager]    Native views enabled: undefined
  [packager]    Using services URL http://staging.api.gameclosure.com
[build-browser]    embedding ttf and svg font KatanaRegular -- KatanaRegular
[build-browser]    embedding ttf and svg font BPReplay -- BPReplay

Uncaught Exception: ReferenceError: splashSizes is not defined
    at generateGameHTML (/home/user/git/gameclosure/lib/timestep/build/browser/browser.js:270:11)
    at SuperGroup.<anonymous> (/home/user/git/gameclosure/lib/timestep/build/browser/browser.js:483:38)
    at SuperGroup._execNextStep (/home/user/git/gameclosure/node_modules/ff/lib/ff.js:338:9)
    at Group.done (/home/user/git/gameclosure/node_modules/ff/lib/ff.js:70:16)
    at SuperGroup._execNextStep (/home/user/git/gameclosure/node_modules/ff/lib/ff.js:359:31)
    at Group.done (/home/user/git/gameclosure/node_modules/ff/lib/ff.js:70:16)
    at SuperGroup.<anonymous> (/home/user/git/gameclosure/node_modules/ff/lib/ff.js:143:33)
    at SuperGroup.<anonymous> (/home/user/git/gameclosure/node_modules/ff/lib/ff.js:389:23)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

  Terminating in 5 seconds...

basil exited with an error. The logs are in /tmp/basil.log.
Contact our support team ([email protected]) with these logs for assistance.

error occurs on this section of code

var splash = project.manifest.splash;
var splashPaths = ['landscape1536', 'landscape768', 'portrait2048', 'portrait1136', 'portrait1024', 'portrait960', 'portrait480'];
var i = splashSizes.length;
var splashPath = splash[splashPaths[--i]];

renaming splashSizes.length to spalshPaths.length stops server crashing but on iPhone is still only black screen.

distribute via npm?

Currently devkit is marked as private in the package.json.

Using npm for distribution would ease cross-platform compatibility a bit, as currenctly the install.sh assumes you're on OS X and tries to install to $PREFIX (well, actually even that is hardcoded to be /usr/local), which is often not in similar use with Linux.

With npm you could just let npm take care of the differences, get rid of install.sh (which pretty much just checks that you have npm and does what npm install -g would do anyway), and add git submodule update --init --recursive as a prepublish script to the package.json (and make sure npmignore doesn't include ./lib/).

Thanks for a great tool!

Basil Update no working

I got these errors when trying to update to 0.1.13. Beside that, i can't compile with --clean option, same kind of errors.

MB-Neco:Snake Claudio$ basil update
Attempting to switch to release-0.1.13
Extracting changes to SDK
[git] [warn] No stash found.

Checking out version release-0.1.13
[git] [warn] HEAD is now at 38e1c80... 0.1.13 change log

Running install script
[./install.sh] -{{{> Game Closure DevKit
[./install.sh] Installing...
[./install.sh]
[./install.sh] Initializing GC DevKit libraries ...
[./install.sh] Synchronizing submodule url for 'lib/NativeInspector'
[./install.sh] Synchronizing submodule url for 'lib/gcapi'
[./install.sh] Synchronizing submodule url for 'lib/jsio'
[./install.sh] Synchronizing submodule url for 'lib/squill'
[./install.sh] Synchronizing submodule url for 'lib/timestep'
[./install.sh] Synchronizing submodule url for 'projects/whack-that-mole'
[./install.sh]
[./install.sh] creating link to /Users/Claudio/Applications/devkit/sdk/jsio
[./install.sh] creating link to /Users/Claudio/Applications/devkit/sdk/timestep
[./install.sh] creating link to /Users/Claudio/Applications/devkit/sdk/squill
[./install.sh] creating link to /Users/Claudio/Applications/devkit/sdk/gc
[./install.sh] creating link to /Users/Claudio/Applications/devkit/sdk/addons
[./install.sh] [warn] [checkVersions] checking for tealeaf-build-tools 0.2.4

[./install.sh] [warn] [checkVersions] tealeaf-build-tools { channel: '',
[./install.sh] major: 0,
[./install.sh] minor: 2,
[./install.sh] patch: 4,
[./install.sh] build: 0,
[./install.sh] tag: '',
[./install.sh] src: '0.2.4' } present

[./install.sh] [warn] [checkVersions] tealeaf-build-tools creating link...

[./install.sh] [warn] [checkVersions] tealeaf-build-tools link created!

[./install.sh] Updating addon examples
[./install.sh] Updating addon native-android
[./install.sh] Updating addon native-ios
[./install.sh] [warn] [addons] getting registry version for examples
[./install.sh] [addons] getting registry version for native-android

[./install.sh] [warn] [addons] getting registry version for native-ios

[./install.sh] [warn] [addons] reading addon registry

[./install.sh] [warn] [git] [warn] From https://github.com/gameclosure/addon-registry
[./install.sh] [git] * branch master -> FETCH_HEAD
[./install.sh]

[./install.sh] [warn] [git]
[./install.sh] [warn] Already up-to-date.

[./install.sh] [warn] [addons] Updated registry.

[./install.sh] [warn] [addons] Using version from SDK: release-0.1.12

[./install.sh] [warn] [addons] Using version from SDK: release-0.1.12

[./install.sh] [warn] [addons] Using version from registry: master

[./install.sh] [warn] [addons] checking native-android for updates

[./install.sh] [warn] [addons] checking native-ios for updates

[./install.sh] [warn] [addons] checking examples for updates

[./install.sh] [warn] [addons] [error] Cannot update native-ios please checkout master branch first.

[./install.sh] [warn] [addons] [error] Cannot update examples please stash or remove local changes first.

[./install.sh] [warn] [git] [warn] Already on 'master'
[./install.sh]

[./install.sh] Running install.sh
[./install.sh] [warn] [sh]
[./install.sh] [warn] Synchronizing submodule url for 'barista'

[./install.sh] [warn] [sh]
[./install.sh] [warn] Synchronizing submodule url for 'native-core'

[./install.sh] [warn] [sh]
[./install.sh] [warn] android update project -p TeaLeaf --target android-15 --subprojects

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated
[./install.sh] [warn] project.properties
[./install.sh] [warn]

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated
[./install.sh] [warn] local.properties
[./install.sh] [warn]

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated file TeaLeaf/proguard-project.txt

[./install.sh] [warn] [sh] Updated project.properties
[./install.sh] [sh] Updated local.properties

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated file
[./install.sh] [warn] TeaLeaf/bin/proguard-project.txt

[./install.sh] [warn] [sh]
[./install.sh] [warn] android update project -p GCTestApp --target android-15 --subprojects

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated
[./install.sh] [warn] project.properties
[./install.sh] [warn]

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated
[./install.sh] [warn] local.properties
[./install.sh] [warn]

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated
[./install.sh] [warn] file
[./install.sh] [warn] GCTestApp/proguard-project.txt
[./install.sh] [warn]

[./install.sh] [warn] [sh]
[./install.sh] [warn] Updated
[./install.sh] [warn] project.properties

[./install.sh] [warn] [sh] Updated local.properties

[./install.sh] [warn] [sh] Updated file GCTestApp/bin/proguard-project.txt

[./install.sh] [warn] [sh]
[./install.sh] [warn] node plugins/updatePlugins.js

[./install.sh] [warn] [sh]
[./install.sh] [warn] node checkSymlinks

[./install.sh] [warn] [sh]
[./install.sh] [warn] creating link to /Users/Claudio/Applications/devkit/addons/native-android/TeaLeaf/jni/core

[./install.sh] [warn] [sh]
[./install.sh] [warn] ndk-build -C TeaLeaf clean

[./install.sh] [warn] [sh]
[./install.sh] [warn] Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion 8 in ./AndroidManifest.xml

[./install.sh] [warn] [sh]
[./install.sh] [warn] make[1]: Entering directory `/Users/Claudio/Applications/devkit/addons/native-android/TeaLeaf'

[./install.sh] [warn] [sh]
[./install.sh] [warn] Clean: andprof [armeabi]

[./install.sh] [warn] [sh] [warn] /bin/sh: -c: line 0: syntax error near unexpected token (' [./install.sh] [sh] /bin/sh: -c: line 0:rm -rf (TARGET_OBJS)'
[./install.sh]

[./install.sh] [warn] [sh] [warn] make[1]: *** [clean-andprof-armeabi] Error 2
[./install.sh]
[./install.sh] [sh]
[./install.sh] [warn] make[1]: Leaving directory `/Users/Claudio/Applications/devkit/addons/native-android/TeaLeaf'

[./install.sh] [warn] [sh] [warn] make: *** [clean] Error 2
[./install.sh]

[./install.sh] [warn] [sh] [error](sh exited with code 2)

[./install.sh] Install complete

ERROR 1 after 'basil update'

Executing "basil update" just give me the following error message:

Attempting to switch to release-0.1.1
Extracting changes to SDK
ERROR 1

I am on OS X Version 10.8.2.

Basil error in case the client and server are not on the same local network.

When the server with basil and client on the same local network everything it's ok. But, when server local and external IP adress is different, then simulate are not working on the client. If it is simulate of mobile device basil stopping on this step:

  [java]    [warn]  java version "1.6.0_27"
  [java]   OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-0ubuntu1~12.04.1)
  [java]   OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
  starting server, session url is <>
  INFO .env.node.csp Listening csp@:9225
  INFO .env.node.tcp Listening tcp@:9226
  [basil]    Server launched at http://localhost:9200/
 [basil]    Your local IP is [ '10.227.150.112' ]
  [jvmtools]    Connected to daemon on localhost:41975
[native]    native inspector exited with code 8
  [jsio]    Compiling Source code.
  [jsio]    jsio_compile "import GUI,preprocessors.import,preprocessors.cls" --jsioPath "sdk/jsio" --noIE "true" --environment "browser" --path "[\".\",\"sdk/jsio\",\"sdk/gc/api/\",\"sdk/\",\"sdk/timestep/\",\"src/serve/plugins/simulate/static\"]" --includeJsio "true" --appendImport "false" --debug "4" --cwd "/home/ubuntu/devkit"
  WARN preprocessors.compiler could not compile import from sdk/jsio/preprocessors/import.js: ' + p2 + '
    [packager]    Splash image mapped from universal -> portrait2048

If it is simulate of browser:

  [java]    [warn]  java version "1.6.0_27"
  [java]    [warn]
  [java]    [warn]  OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-0ubuntu1~12.04.1)
  [java]   OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
  starting server, session url is <>
  INFO .env.node.csp Listening csp@:9225
  INFO .env.node.tcp Listening tcp@:9226
 [basil]    Server launched at http://localhost:9200/
 [basil]    Your local IP is [ '10.227.150.112' ]
[native]    native inspector exited with code 8
    [jvmtools]    Connected to daemon on localhost:45242
  [jsio]    Compiling Source code.
  [jsio]    jsio_compile "import GUI,preprocessors.import,preprocessors.cls" --jsioPath "sdk/jsio" --noIE "true" --environment "browser" --path "[\".\",\"sdk/jsio\",\"sdk/gc/api/\",\"sdk/\",\"sdk/timestep/\",\"src/serve/plugins/simulate/static\"]" --includeJsio "true" --appendImport "false" --debug "4" --cwd "/home/ubuntu/devkit"
  WARN preprocessors.compiler could not compile import from sdk/jsio/preprocessors/import.js: ' + p2 + '

GC.app.getCanvas()

this is in our docs, but not in the code. shouldn't be tough to add. there appears to be a canvas here: GC.app.engine._ctx.canvas.

'basil update' not working

i just cloned the github repo, runned the .install.sh correctly
but when i try to call 'basil update' the process apparently hangs after creating the tealeaf-build-tools link

any suggestion?
Java, nodejs, android sdk and Xcode tools are correctly installed and exported to the path

Attempting to switch to release-0.1.11
Extracting changes to SDK
       [git]    [warn]  No stash found.

Checking out version release-0.1.11
       [git]    [warn]  HEAD is now at 3105278... 0.1.11 change log

Running install script
[./install.sh]   -{{{> Game Closure DevKit
[./install.sh]   Installing...
[./install.sh]
[./install.sh]   Initializing GC SDK libraries ...
[./install.sh]   Synchronizing submodule url for 'lib/NativeInspector'
[./install.sh]   Synchronizing submodule url for 'lib/gcapi'
[./install.sh]   Synchronizing submodule url for 'lib/jsio'
[./install.sh]   Synchronizing submodule url for 'lib/squill'
[./install.sh]   Synchronizing submodule url for 'lib/timestep'
[./install.sh]   Synchronizing submodule url for 'projects/whack-that-mole'
[./install.sh]
[./install.sh]   creating link to /spaces/games/devkit/sdk/jsio
[./install.sh]   creating link to /spaces/games/devkit/sdk/timestep
[./install.sh]   creating link to /spaces/games/devkit/sdk/squill
[./install.sh]   creating link to /spaces/games/devkit/sdk/gc
[./install.sh]   creating link to /spaces/games/devkit/sdk/addons
[./install.sh]    [warn]  [checkVersions]    checking for tealeaf-build-tools 0.2.4

[./install.sh]    [warn]  [checkVersions]    tealeaf-build-tools { channel: '',
[./install.sh]     major: 0,
[./install.sh]     minor: 2,
[./install.sh]     patch: 4,
[./install.sh]     build: 0,
[./install.sh]     tag: '',
[./install.sh]     src: '0.2.4' } present

[./install.sh]    [warn]  [checkVersions]    tealeaf-build-tools creating link...

[./install.sh]    [warn]  [checkVersions]    tealeaf-build-tools link created!

[./install.sh]

"Error: EACCES, symlink" when installing

Hey,

I was following the docs and was running ./install.sh and got an exception

npm ERR! Error: EACCES, symlink '/Users/martin/prog/gameClosure/devkit'
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.
npm ERR! 
npm ERR! System Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "link" "--local"
npm ERR! cwd /Users/martin/prog/gameClosure/devkit
npm ERR! node -v v0.6.14
npm ERR! npm -v 1.1.12
npm ERR! path /Users/martin/prog/gameClosure/devkit
npm ERR! code EACCES
npm ERR! message EACCES, symlink '/Users/martin/prog/gameClosure/devkit'
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/martin/prog/gameClosure/devkit/npm-debug.log

I ran
sudo chown -R $(whoami) /usr/local
as per the docs, and tried to re-run the command
"node" "/usr/local/bin/npm" "link" "--local"
I get a different error this time though
Error: No compatible version found: read@'>=1.0.2- <1.1.0-'.

I'm a node/npm novice, any help would be greatly appreciated. Cheers.

Investigate appID generation

It appeared during testing that two apps had the same "unique" appID causing problems with the iOS test-app. I believe the manifest.json is not being filled in with a generated appID when it doesn't look random enough.

Error on command "basil serve" with linux

when i run the command "basil serve" it crashes....

               {{ Game Closure SDK }}
                   release-0.1.1
                Needs more ketchup.

starting server, session url is <>
INFO .env.node.csp Listening csp@:9225
INFO .env.node.tcp Listening tcp@:9226
[basil] Server launched at http://localhost:9200/

 [basil]    Your local IP is []

ERROR Error: spawn ENOENT
at errnoException (child_process.js:922:11)
at Process.ChildProcess._handle.onexit (child_process.js:713:34)
at process._makeCallback (node.js:322:24)
basil exited with an error. The logs are in /tmpbasil.log.
Contact our support team ([email protected]) with these logs for assistance.

Wrong compiling on Android

I'm really a bit confused with this issue,
I'm trying to get my Construct2 (HTML5 exported) games work on GC following your amazing example,
even if i get the spaceblaster working i keep stumbling upon other errors that are not enough descriptive.
Decompiling the apk what i find out is that at compile time i get a js file "native.js" renamed as "native.js.mp3" might this be the problem?

node 0.10.0: basil serve fails with an error

Upgrading to node 0.10.0 breaks basil serve. Tested everything works great with node 0.8.0.

At a minimum, update the docs here http://docs.gameclosure.com/guide/install.html

to state node version 0.8.x. (I'm assuming the dev branch 0.9 won't work here either)

~> basil serve

============================================================
                   {{ Game Closure SDK }}                   
                       release-0.1.7
                    Life is squill.Pane
------------------------------------------------------------
[basil]    [error]  [TypeError: Arguments to path.join must be strings]

[bugfix] Remote remote debug broken

Hi Chris,

Arno asked me to forward this to you. I've experienced a small bug when browsing the devkit portal (on port 9200) from a different machine than where basil serves. When I click the remote debugger link on the left it tries to access 0.0.0.0:9220 and shows an error. If I manually change to the right IP it works fine and I can debug the app running on my Android phone.

Not sure if it's related, but I run basil on OSX virtualised on a Windows machine, and access the portal from Ubuntu (a weird mix I know).

Cheers,
Marijn

ui.TextView not displaying text in Android

I can not see text using ui.TextView when running in Android phone.

I tried Blob Blast game and the same thing is happening there.

I run hello world app and is working properly.

Using release-0.1.19.

Error: Target id is not valid. Use 'android list targets' to get the target ids.

root@marlon-laptop:/home/marlon/devkit/projects/whack-that-mole# basil build native-android --no-compress --debug --clean
[build] Building: debug/native-android
[build-native] Writing resources for 7ba6726c608a43fd8b607d27841e2774 with target native-android
[android] [error] Submodule tealeaf-core not found
[jsio] Inferring opts from platform: native
[packager] native-android { appID: '7ba6726c608a43fd8b607d27841e2774',
version: undefined,
fullPath: '/home/marlon/devkit/projects/whack-that-mole',
compress: false,
debug: true,
release: true,
servicesURL: 'http://api.gameclosure.com',
output: '/home/marlon/devkit/addons/native-android/build/whackthatmole/assets/resources',
localBuildPath: 'build/debug/native-android',
isSimulated: false,
isTestApp: false,
noRedirect: false,
noPrompt: true,
packageName: '',
studio: 'lilvarmit.com',
metadata: null,
target: 'native-android',
subtarget: 'android' }
[jsio] Compiling Source code.
[jsio] jsio_compile "gc.native.launchClient" --cwd "/home/marlon/devkit/projects/whack-that-mole" --compressorCachePath "/home/marlon/devkit/projects/whack-that-mole/build/.cache" --printOutput --defines "{"BUILD_TARGET":"native-android","BUILD_ENV":"native","DEBUG":true,"DEV_MODE":true,"ADDON_NATIVE_ANDROID2":true,"ADDON_EXAMPLES":true,"ADDON_NATIVE_ANDROID":true}" --jsioPath "sdk/jsio" --noIE "true" --environment "native" --path "[".","sdk/jsio","sdk/gc/api/","sdk/","sdk/timestep/"]" --includeJsio "true" --appendImport "false" --debug "4"
WARN preprocessors.compiler could not compile import from sdk/gc/native/launchClient.js: 'import base', {}).logging.get('console'
WARN preprocessors.compiler could not compile import from sdk/timestep/device.js: 'import ui.backend.' + (exports.useDOM ? 'dom' : 'canvas'
LOG ..imports Including native runtime.
[make] ndk-build -C TeaLeaf clean
make[1]: Entering directory /home/marlon/devkit/addons/native-android/TeaLeaf' Clean: andprof [armeabi] Clean: cpufeatures [armeabi] Clean: jansson [armeabi] Clean: jpeg [armeabi] Clean: png [armeabi] Clean: stdc++ [armeabi] Clean: tealeaf [armeabi] Clean: v8a [armeabi] Clean: zip [armeabi] Clean: andprof [armeabi-v7a] Clean: cpufeatures [armeabi-v7a] Clean: jansson [armeabi-v7a] Clean: jpeg [armeabi-v7a] Clean: png [armeabi-v7a] Clean: stdc++ [armeabi-v7a] Clean: tealeaf [armeabi-v7a] Clean: v8a [armeabi-v7a] Clean: zip [armeabi-v7a] make[1]: Leaving directory/home/marlon/devkit/addons/native-android/TeaLeaf'
ant -f TeaLeaf/build.xml clean
[make] Buildfile: /home/marlon/devkit/addons/native-android/TeaLeaf/build.xml
[android] Error: Target id is not valid. Use 'android list targets' to get the target ids.
(android exited with code 1)
[android] [error] build failed creating android project
[android] [error] 1

please help me :(

Error: Cannot find module 'jsio'

this error happened when i run ./install script on centos 5.5:
module.js:340
throw err;
^
Error: Cannot find module '/var/linzy/wsp/devkit/sdk/jsio/jsio'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.exports.loadJsio (/var/linzy/wsp/devkit/src/common.js:45:13)
at Object. (/var/linzy/wsp/devkit/src/common.js:50:9)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

Successfully installed. Type "basil" to begin.

Sound panning on javascript bindings please?

Hello there, I'm hoping to be doing it right out here, I would like to file a request for someone to (preety please?) get the javascript bindings for native panning (as in left and right positioning of mono sounds) into GameClosure DevKit. Right now you can load, queue, play and loop sound as well as define and alter volume for both sound effects and background music, so the only thing I'm asking here is panning, which is like really essential for some games, especially when you're going for some user immersion, even if its only in 2d...

So can someone do it or at least create a tutorial to help out on the addition?

Thanks in advance

John More

basil serve not connect to daemon MAC

I made the change from issue #27 but not connect whit deamon.

TERMINAL:

Christians-Mac:whack-that-mole Christian$ basil serve -p 8080

               {{ Game Closure SDK }}                   
                   release-0.1.7
             Like fireworks in a shed.

[basil] Serving from project directory, attempting to automatically register..
starting server, session url is <>
INFO .env.node.csp Listening csp@:9225
INFO .env.node.tcp Listening tcp@:9226
[basil] Server launched at http://localhost:8080/

[basil] Your local IP is [ '192.168.219.128' ]
[native] native inspector exited with code 8
[jvmtools] Connected to daemon on 0.0.0.0:50109

ProjectManager.js:

var EventEmitter = require('events').EventEmitter;
var fs = require('fs');
var path = require('path');
var ff = require('ff');
var common = require('./common');
var packageManager = require('./PackageManager');

var logger = new common.Formatter('games');

var ProjectManager = Class(EventEmitter, function () {
this.init = function () {
this._projectDirs = [];
this._projects = {};

    this.loadConfig();
    common.config.on('change', bind(this, 'loadConfig', true));
};

this.loadConfig = function (reload) {
    if (this._reloading) { return; }
    this._reloading = true;

    var localProjectsPath = common.paths.root('./projects');
    //var localProjects = fs.readdirSync(localProjectsPath).map(common.paths.projects);
    var localProjects = fs.readdirSync(localProjectsPath).map(function (filename) {
        return common.paths.projects(filename);
    });
    var configProjects = common.config.get('projects') || [];
    this._projectDirs = configProjects.concat(localProjects);

    var projects = {};
    var added = [];
    var removed = merge({}, this._projects);
    var f = ff(this, function () {
        this._projectDirs.forEach(function (dir) {
            var onProjectLoad = f.wait();

            packageManager.getProject(dir, bind(this, function (err, project) {
                if (err) {
                    logger.error('Error loading game: at path ' + dir);
                    logger.error(err);

                } else {
                    var id = project.getID();
                    projects[id] = project;
                }

                // track added and removed projects
                if (!(id in this._projects)) {
                    if (projects[id]) added.push(projects[id]);
                } else {
                    delete removed[id];
                }

                onProjectLoad();
            }));
        }, this);
    }, function () {
        // override this._projects with new dictionary
        this._projects = projects;

        // emit add/remove events!
        added.forEach(function (project) {
            if (reload) {
                logger.log('added', project.getID());
            }

            this.emit('AddProject', project);
        }, this);

        Object.keys(removed).forEach(function (id) {
            if (reload) {
                logger.log('removed', removed[id].getID());
            }

            this.emit('RemoveProject', removed[id]);
        }, this);

        this._reloading = false;
    });
};

this.getProjectDirs = function () {
    return this._projectDirs;
};

this.getProjects = function () {
    return this._projects;
};

});

module.exports = new ProjectManager();

basil serve error in Mac

Christians-Mac:whack-that-mole Christian$ basil serve

               {{ Game Closure SDK }}                   
                   release-0.1.7
                Life is squill.Pane

[basil] [error] [TypeError: Arguments to path.join must be strings]

Simulator's Home Screen Button Broken

The Home Screen Button in the browser simulator does not properly trigger the 'pagehide' event. The following listener code works in native, but does not fire when the Home Screen Button is pressed in the browser:

window.addEventListener('pagehide', bind(this, "onAppHide"), false);

Allow running basil via relative path

within bin dir, ./basil works
with full path /path/to/devkit/bin/basil works

~/path/to/devkit > ./bin/basil fails with

module.js:340
    throw err;
          ^
Error: Cannot find module '/Users/kevin/source/github/devkit/bin/src/basil'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
basil exited with an error. The logs are in /var/folders/27/hxz48gdd0s736x2k28t7v5sm0000gn/T//basil.log.
Contact our support team ([email protected]) with these logs for assistance. 

...or at least a better error message

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.