• Stars
    star
    615
  • Rank 72,947 (Top 2 %)
  • Language
    JavaScript
  • Created almost 12 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

HTML 5 game platform for browser and mobile

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

More Repositories

1

webgl-2d

Canvas2D API in WebGL
JavaScript
509
star
2

js.io

Javascript Networking Library for building real-time web applications
JavaScript
294
star
3

hookbox

HookBox is a Comet server and message queue that tightly integrates with your existing web application via web hooks and a REST interface.
JavaScript
285
star
4

orbited2

Next generation Orbited (putting a WebSocket in every browser.)
JavaScript
121
star
5

ff

Concise, powerful asynchronous flow control library for JavaScript
JavaScript
85
star
6

gcif

Game Closure Image Format
C++
85
star
7

hermes

Clojure wrapper for Titan
Clojure
37
star
8

isometric

JavaScript
26
star
9

spidermonkey-ios

Game Closure modified bleeding-edge Mozilla SpiderMonkey JavaScript engine
JavaScript
19
star
10

platformer

Platformer Framework for DevKit
JavaScript
17
star
11

timestep

JavaScript
16
star
12

native-ios

GC Native iOS
C
14
star
13

native-android

GC Native Android
C
14
star
14

csp_eventlet

A Comet Session Protocol implementation for eventlet
Python
13
star
15

squill

The foremost js.io UI package.
JavaScript
13
star
16

gcif-reader

Game Closure Image Format Reader
C++
13
star
17

whack-that-mole

A basic game and introduction to the Game Closure SDK.
JavaScript
12
star
18

devkit-core

JavaScript
11
star
19

native-core

GC Native Core
C
10
star
20

facebook

Game Closure DevKit Plugin: Facebook
Java
10
star
21

jash

jash
JavaScript
10
star
22

libstrophe-ios

iOS version of libstrophe that does not require OpenSSL
C
9
star
23

rtjp_eventlet

Simple RTJP implementation build on eventlet
Python
9
star
24

demoIsometricGame

JavaScript
9
star
25

blobblast

Blob Blast
JavaScript
8
star
26

swarm

Survive the swarm, as long as you can!
JavaScript
6
star
27

barista

serving you JS just to your specification
JavaScript
5
star
28

url-parser

url-parser extracted from Joyent's http-parser
C
5
star
29

demoMenus

JavaScript
5
star
30

menus

JavaScript
4
star
31

xx

Object Locking for JavaScript: It's what you need when you need it, but you have to wait in line to get it.
4
star
32

artTools

art tools
JavaScript
4
star
33

libjpeg-turbo-build-scripts

Build scripts for libjpeg-turbo (64-bit iOS) with SIMD
Shell
4
star
34

gamekit

Game Closure Devkit Plugin for iOS GameKit and Android Game Services
JavaScript
4
star
35

geoloc

Game Closure DevKit Plugin : Geolocation
Java
4
star
36

devkit-parallax

Easy-to-use, bidirectional, configurable parallax system
JavaScript
4
star
37

devkit-entities

A set of base classes to jump start your game on devkit!
JavaScript
4
star
38

comet

Official PixiJS Editor
TypeScript
3
star
39

accelerometer

Provides accelerometer for android dev-kit games
Java
3
star
40

billing

Game Closure DevKit Plugin : In-App Billing
Java
3
star
41

devkit-scene

The play's scene up on the high stage, the module to play the game.
JavaScript
3
star
42

devkit-effects

A set of easy to use effects to amp up any game on devkit!
JavaScript
3
star
43

appflood

Game Closure DevKit Plugin : App Flood
Objective-C
3
star
44

NativeInspector

Cleanroom implementation of Web Inspector for Android V8 Debug Server
JavaScript
3
star
45

sponsorpay

Game Closure Devkit Plugin : SponsorPay
Objective-C
3
star
46

shooter

JavaScript
2
star
47

bcif

Our branch of BCIF based off 1.0 beta from http://www.researchandtechnology.net/bcif/
Java
2
star
48

sharing

Sharing plugin for devkit
JavaScript
2
star
49

particle-editor

A particle editor for devkit applications
JavaScript
2
star
50

adventuremap

JavaScript
2
star
51

wordrace

fast-paced real-time multiplayer word game
JavaScript
2
star
52

ouya

Game Closure Devkit Plugin : OUYA
Java
2
star
53

appnext

Game Closure Devkit Plugin : Appnext
Objective-C
2
star
54

leadbolt

Game Closure DevKit Plugin : LeadBolt
Objective-C
2
star
55

googleanalytics

Game Closure Devkit Plugin : Google Analytics
Objective-C
2
star
56

demoShooter

JavaScript
2
star
57

tapjoy

Game Closure Devkit Plugin : Tapjoy
Objective-C
2
star
58

OpenSSL-SASL-iOS

Working build scripts for Xcode 5.0 build of OpenSSL 1.0.1e and SASL 2.1.25 for i386, armv7, and armv7s fat static library
C
1
star
59

devkit-spriter

JavaScript
1
star
60

mitri

The Mighty Triangle
JavaScript
1
star
61

trademob

Game Closure Devkit Plugin : TradeMob
Objective-C
1
star
62

gcapi

JavaScript
1
star
63

devkit-commands

JavaScript
1
star
64

chartboost

Game Closure Devkit Plugin : Chartboost
Objective-C
1
star
65

community-art

Community art
JavaScript
1
star
66

mopub

Game Closure DevKit Plugin : MoPub
Java
1
star
67

dark-side

a response-comparing proxy server made of pure evil
Python
1
star
68

jumptap

Game Closure Devkit Plugin : Jumptap
Objective-C
1
star
69

phaser-breakout

The phaser breakout example integrated with Devkit.
JavaScript
1
star
70

demoSponsorpay

Demo application for Sponsorpay/Fyber module for GameClosure Devkit
JavaScript
1
star
71

inmobi

Game Closure Devkit Plugin : InMobi
Objective-C
1
star
72

tapfortap

Game Closure DevKit Plugin : TapForTap
Objective-C
1
star
73

demo-photos

JavaScript
1
star
74

demoChartboost

DevKit Chartboost Module Demo
JavaScript
1
star
75

examples

Basil addon for example demos.
JavaScript
1
star
76

devkit-fuzz

JavaScript
1
star
77

devkit-plugin-builder

JavaScript
1
star
78

amplitude

Game Closure Devkit Plugin : Amplitude
Objective-C
1
star
79

angular-mergely

An angular wrapper for mergely
CSS
1
star
80

web-crypto-rsa-aes

library for encrypting strings with rsa+aes using WebCrypto (and asmcrypto.js fallback)
JavaScript
1
star
81

gem-prototype

HTML
1
star