JavaScript 3D game.
Repository does not include game textures, libraries and assembled sources. Before running this project, you should build it first. Follow these steps:
-
Install Node.js
- It's always better to choose the latest stable version available: we are trying to keep everything up to date;
- Make sure you installed the Node Package Manager (npm).
-
Run
npm install
- This task will download required dependencies, including Gulp, Bower and LESS;
- As post install task,
bower install
will be executed to download project libraries; - See package file and bower file for the additional information.
-
Run
gulp build
- This task will create/update the game libraries under the
lib/
folder, build the game files and compile the styles. - See Gulp file for the additional information about the tasks.
- This task will create/update the game libraries under the
-
- Run
gulp data
- Textures is a binary data, so they are not included into the repository;
- Alternatively, you can do it yourself: download the base archive with data, unpack and place it under your game root folder.
- Run
Basically, this web application should run on a server. Game won't work properly due to cross-origin requests restrictions in browser's security policy. You must run game on the server (best practice), or make changes to the browser security settings. You can either follow step A or step B.
Run node server.js
under the repository root.
See the following article.
loader.js
- resource load and game initialization.Utils.js
- additions to the standard math library.Settings.js
- changeable game settings: window size, fov, mouse sensitivity.Caches.js
- cached (regular and preloaded) objects.Objects.js
- simple world objects.Quest.js
- quest parser and objects.Player.js
- camera and user controls.UI.js
- user interface.World.js
- scene and complex game objects.Engine.js
- renderer and rendering methods.Game.js
- initialization, bindings and main game cycle.
- Event for the
h
(code: 72) keydown was removed from the dat.gui.js. It should be also removed for all future updates of this library.
Code | # | Description |
---|---|---|
~ | 192 | show/hide degug statistics |
z | 90 | turn developer mode on/off |
x | 88 | toogle fullscreen for canvas |
c | 67 | toogle menu, disable pointer lock |
Code | # | Code | # | Code | # |
---|---|---|---|---|---|
Tab | 9 | Esc | 27 | Alt | 18 |