📜 ⬆️ ⬇️

Review and install The Game Closure DevKit in Ubuntu

The unlit event on Habrahabr was the release of The Game Closure DevKit. This is a game engine that uses Javascript and HTML5 technologies to create Web, iOS and Android applications.
GC Devkit has an interface for monitoring objects in a running application, while developing in Javascript allows you to use a browser debugging environment. GC is free even for commercial use, and the code is open under the dual license GPLv3 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 putting Devkit on Ubuntu.

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

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

Installing Node.js locally


 sudo apt-get install g++ 

Add the following 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 in the system.
')
Download the latest version of Node.js from the site (I have a 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 make install cd ~/ ln -s .local/lib/node_modules .node_modules 

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 each time the console starts.

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

Install Game Closure DevKit


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 tells you to change the owner / usr / local:
 nano install.sh 

Find:
 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 

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 perform:
 ./install.sh 

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

If you go to the browser at localhost: 9200 , you will see a project manager with the demo game “Whack-that-Mole!”, With which you can evaluate some of the 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.

Source: https://habr.com/ru/post/171999/


All Articles