• Stars
    star
    269
  • Rank 147,955 (Top 3 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 10 years ago
  • Updated almost 10 years ago

Reviews

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

Repository Details

Gargantia game editor

Gargantia Editor

Introduction

This repository contains all the code required to run and edit the first mission of Gargantia: Sky Courier a 3D arcade flight simulator based on the Turbulenz Engine. The developer teardown article on Modern.IE gives an introduction to the project and the technology, while this README contains all the technical info you need to get up and running!

Installation

To get started all you need is the code in this repository and a simple web server. First of all download this code to your computer either using git clone, or if you don't have git installed by clicking on the link to the right of this page to download the code in a zip file. Make a note of where you unpack the code or clone the repository - we will refer to that directory as the project root directory in the next steps.

Running a web server

To actually see the code running you will need two things, a web server and a modern web browser that supports WebGL, such as Internet Explorer 11, Chrome or Firefox. If you have a simple web server already installed then you just need to point it at the root directory, there is an index.html file that will load and run the project. If not then you can try either of these simple options:

Python: SimpleHTTPServer

First of all install Python (for best results we recommend using Python 2.7 32 bit) on your system (installers for most systems can be found here). Once python is installed, open a command line and navigate to the project root directory then simply run:

python -m SimpleHTTPServer

If installing python did not add it to your system path then you may need to explicitly give the path to your python interpreter, for example:

c:\Python27\python -m SimpleHTTPServer

Your firewall may ask for permission to allow python to access the network - you will need to allow this to be able to access the webserver from your browser.

Node.js: http-server

To use the node http server, first of all install node.js on your system (installers for most systems can be found here). Once node is installed, install the simple Http Server module using npm. Simply open up a command line and run:

npm install http-server -g

Then navigate to the project root directory and run

http-server -p 8000

Your firewall may ask for permission to allow node.js to access the network - you will need to allow this to be able to access the webserver from your browser.

Running the sample

With your chosen web server running you simply need to open a web browser and navigate to http://localhost:8000

The Game

Controls

To start with you probably just want to try out the game to see how it works. The controls are simple, use 'WASD' or the arrow keys to fly the surf-kite around. To complete the level you must fly through the rings in order before time runs out. You can boost with the space bar to give yourself a little extra speed.

Tweaking the game

To the left of the screen you can see the DynamicUI panel. Various sections of the UI can be expanded by clicking on them to offer up a number of checkboxes and other controls that allow you to inspect and tweak the game while it is running. Try clicking on Debug Draw and then selecting Camera to see how the camera is dragged around by the hero character.

The Editor

At any point you can hit enter to drop into editor mode. In this mode you can edit and add entities to the level and save your results. Hitting enter again will switch back into game mode putting you at the start of the level with any changes you have made.

To make permanent changes to the level just hit the Save button in the Editor section of the DynamicUI panel. These changes will be saved locally in your browser and can then be loaded again using the Load button.

The Code

As this is a debug build of the game all the source files are loaded every time the game is run, so to make changes to the source code you just need to change one of the files and hit reload.

The code is organised into several directories:

  • 📁 css Styles for the page
  • 📁 dynamicui code and styles for the controls in the side panel
  • 📁 client In-game code to activate the UI
  • 📁 lib External libraries used by the UI
  • 📁 server Runs the UI on the page
  • 📁 game The game code
  • 📁 assets The mission file used by the sample
  • 📁 editor The Turbulenz in-game editor code
  • 📁 jslib The Turbulenz library
  • 📁 scripts The game code for the Gargantia Sky Courier sample
  • 📁 img Images used by the page
  • 📁 staticmax Assets (textures, sounds and other files) used by the game
  • 📜 README.md This file
  • 📜 index.html The main page of the web app
  • 📜 mapping_table.json This file maps from human-friendly asset names to the names of the files in the staticmax directory.

Most of the interesting code you will want to experiment with is in the game/scripts directory. Here you can find files such as game/scripts/entitycomponents/eclocomotion.js that controls the movement of the main character.

License

The software in this repository is provided under the conditions specified in the LICENSE file

Links

Credits

The work provided in this repository is Copyright Turbulenz Limited 2014 unless stated otherwise.

Our thanks to all involved at Turbulenz, Microsoft and Production IG.

More Repositories

1

turbulenz_engine

Turbulenz is a modular 3D and 2D game framework for making HTML5 powered games for browsers, desktops and mobile devices.
TypeScript
4,450
star
2

turbulenz_tools

Python tools for development with the Turbulenz Engine
Python
61
star
3

turbulenz_local

Local development server for developing games with the Turbulenz Engine
Python
53
star
4

NvTriStrip

NvTriStrip library and NvTriStripper tool
C++
52
star
5

gyp

Clone of https://chromium.googlesource.com/external/gyp
Python
15
star
6

boundless.worlds

Official Boundless World Builder standard library, including reusable worlds, biomes, noises and more!
10
star
7

tbb-ios

Intel's Thread Building Blocks source, with build files for iOS.
C++
10
star
8

turbulenz_jslib

Turbulenz Engine JavaScript libraries generated from turbulenz_engine TypeScript libraries.
JavaScript
9
star
9

debrisdodger

A simple 2D/3D space-based object avoidance game written as a simple introduction to the Turbulenz HTML5 Game Engine.
JavaScript
9
star
10

webgl_benchmark

Polycraft.gl is an online benchmark application that measures the performance of your WebGL compatible device, powered by Polycraft and ga.me.
JavaScript
7
star
11

typescript

Changes to the typescript compiler
TypeScript
5
star
12

turbulenz_build

GNU Make-based multi-platform build process for compiling modules of C++ and ObjC code using a very simple specification. Supports building static libs, dynamic libs and applications and handles module dependencies and external libraries.
Makefile
4
star
13

boundless.maps

Simple viewer for Boundless world maps
HTML
1
star
14

libvpx

Clone of https://chromium.googlesource.com/webm/libvpx
C
1
star
15

oort-discourse-plugin

The Discourse Plugin to give backers badges and titles, and put them in the Founders Group
Ruby
1
star
16

openssl-ios

Clone of ios-openssl build scripts, with changes for turbulenz.
Objective-C
1
star