Overview and installation of The Game Closure DevKit in Ubuntu

An unlit event on Habrahabr was the release of The Game Closure DevKit. This is a game engine that uses Javascript and HTML5 technology to create Web, iOS and Android applications.
GC Devkit has an interface for observing objects in a running application, while Javascript development allows you to use the browser debugging environment. GC is free even for commercial use, and the code is open under the dual GPLv3 license and Game Closure Free License (GCFL). The main features can be seen in the video posted on the official GC website :

Tasty, isn't it? Let's try installing Devkit on Ubuntu.

At the moment, officially Game Closure only supports OSX, but with some efforts, the set can be launched in Ubuntu. Let's start:
sudo apt-get install git openjdk-6-jre

Node.js. is also needed. It must be installed locally, otherwise GC during installation will ask you to change the owner of the / usr / local folder.

Installing Node.js Locally

sudo apt-get install g++

Add the lines to the ~ / .npmrc file:
root    = /home/YOUR-USERNAME/.local/lib/node_modules
binroot = /home/YOUR-USERNAME/.local/bin
manroot = /home/YOUR-USERNAME/.local/share/man
where YOUR-USERNAME is your login on the system.

Download the latest version of Node.js from the site (I have node-v0.8.22.tar.gz ) and go to the folder with the downloaded archive:
cd ~/Downloads/
tar xf node-v0.8.22.tar.gz
cd node-v0.8.22/
./configure --prefix=~/.local
make install
cd ~/
ln -s .local/lib/node_modules .node_modules

We execute the command:
export PATH=$HOME/.local/bin:$PATH
You can add this line to the end of the ~ / .bashrc file so that the paths to Node.js are loaded every time the console starts.

which npm
If you see ~ / .local / bin / npm, then the installation of Node.js is complete and you are ready to install Game Closure.

Installing Game Closure DevKit

Let's go to the folder where we want to download the GC and download it:
cd ~/
git clone https://github.com/gameclosure/devkit
cd devkit/

Now in the installation script you need to comment out the line that indicates the need to change the / usr / local host:
nano install.sh

if [ ! -w "/usr/local" ]; then
		error "You need write permissions to /usr/local"
		echo "Try running: sudo chown -R \$USER /usr/local"
		exit 1

and do this:
# if [ ! -w "/usr/local" ]; then
# 		error "You need write permissions to /usr/local"
# 		echo "Try running: sudo chown -R \$USER /usr/local"
# 		exit 1
# fi

It remains to execute:

If the installation was correct, then the command:
basil -v
The version of Game Closure should be displayed (I have release-0.1.4 ). Now you can run it:
basil serve

If you go to the localhost: 9200 browser , you will see the project manager with the demo game “Whack-that-Mole!”, With which you can evaluate some features of Game Closure.

Thanks for attention! In the next article I would like to describe the creation of a simple game on this engine.

Also popular now: