Git Product home page Git Product logo

hexgl's Introduction

HexGL

Source code of HexGL, the futuristic HTML5 racing game by Thibaut Despoulain

Branches

  • Master - Public release (stable).

License

Unless specified in the file, HexGL's code and resources are now licensed under the MIT License.

Installation

cd ~/
git clone git://github.com/BKcore/HexGL.git
cd HexGL
python -m SimpleHTTPServer
chromium index.html

To use full size textures, swap the two textures/ and textures.full/ directories.

Note

The development of HexGL is in a hiatus for now until I find some time and interest to work on it again. That said, feel free to post issues, patches, or anything to make the game better and I'll gladly review and merge them.

hexgl's People

Contributors

baleboy avatar bkcore avatar dholbert avatar i-khan avatar licson avatar townxelliot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexgl's Issues

Is this project dead?

Hello, I love this game. It's too good to play without having to install anything. Continue working on it, it could become a very complex but easy to play game!

Motion control not working all the time

When i hold my phone (Geeksphone Peak) horisontal like you would put it on the table then the motion control works.

But if you hold it vertical something goes wrong with the motion control and the craft turn extreme hard to the left or right like a on/off switch but no setting between.

Also if i turn the phone to the other landscape mode then the motion control works in the wrong direction, if you tilt the phone to the right the craft turn left, and if you tilt the phone to the left the craft goes right.

Will this game be updated?

I'm interested in 3D game design and would like to learn more about level design for the racing games. Does the authors have update plan?

Input Code?

Was wondering where the keyboard input code was (I know, what a lazy request...)

I was interested in trying out the html5 gamepad API seen here

Touch controls would be great

I'd love to test drive this game on my FirefoxOS phone :)
Unfortunately, without touch controls, I can't.
Any chance of adding touch controls?

Gamepad keys control keys are wrong.

Ubuntu 16.10 xbox 360 gamepad.

The game lets me control the air brakes with the start and back key (unplayable this way) but they should be the LB and RB shoulder buttons.

In jstest this keys are 4 and 5 not 6 and 7 like the game seems to use. Maybe it should just use both to widen compatibility.

Same for Firefox and Chromium.

touch controls zoom (pinch)

when using touch controls on chrome, the webpage zooms, so it's unplayable.
somewhere seems to be an event.preventDefault() missing.

License Suggestion

Hello boss,
I just wanted to put up my vote for an MIT license, and I personally believe it to be one of the best options available today. I just wish that, this wonderful project gets used by a lot more people, & MIT would allow just that.

Thanks!

FirefoxOS 1.3 on Geeksphone Keon Issue

The vehicle is somehow underneath the course. The collision with the borders still works and it is possible to steer the vehicle and accelerate. When the course is ascending the perspective of the camera slightly changes so the course and is view is back to normal again for a few seconds.

This behavior is reproducible on a Geeksphone Keon 1.3 prerelease with installed HexGL Mobile.

Screenshot 1

Screenshot 2

Screenshot 3

Loading Bug

Looks like a really cool game! Problem is, I can't load it. It gets to 79% loaded and never farther. Tried in both Chrome and Firefox. I'm on Win7 Pro with an Intel Core2 Quad CPU and a Nvidia GT 220 GPU. 4 gigs of ram. What's wrong?

Multi-player?

Would be way cool if we could have a peer 2 peer solution! :D

Game is broken

when you download the game and launch it through the browser (either by spawning a python server or dropping it on an Apache server) the game failed to load past the main menu, and the chrome JS console goes nuts with the following error repeated infinitely.

Audio.js:140 Uncaught TypeError: panner.setVelocity is not a function
    at Object.bkcore.Audio.setListenerVelocity (Audio.js:140)
    at bkcore.hexgl.ShipControls.update (ShipControls.js:542)
    at Object.ctx.manager.add.components [as render] (Cityscape.js:484)
    at bkcore.threejs.RenderManager.renderCurrent (RenderManager.js:120)
    at bkcore.hexgl.HexGL.update (HexGL.js:137)
    at raf (HexGL.js:102)

commenting out the Audio.js in the html reduces the number of errors, however the game will still not run

THREE.WebGLRenderer 50dev
Three.dev.js:726 WebGL: INVALID_OPERATION: getAttribLocation: program not linked
init @ Three.dev.js:726
Three.dev.js:726 WebGL: INVALID_OPERATION: getAttribLocation: program not linked
init @ Three.dev.js:726
Three.dev.js:726 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:726
Three.dev.js:726 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:726
Three.dev.js:726 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:726
Three.dev.js:726 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:726
Three.dev.js:726 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:726
Three.dev.js:727 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:727
Three.dev.js:727 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:727
Three.dev.js:727 WebGL: INVALID_OPERATION: getUniformLocation: program not linked
init @ Three.dev.js:727
Cityscape.js:120 HIGH
Loader.js:240 Uncaught TypeError: Cannot read property 'addSound' of undefined
    at bkcore.threejs.Loader.loadSound (Loader.js:240)
    at bkcore.threejs.Loader.load (Loader.js:94)
    at Object.load (Cityscape.js:121)
    at bkcore.hexgl.HexGL.load (HexGL.js:153)
    at init (launch.js:27)
    at HTMLDivElement.$.onclick (launch.js:70)
launch.js:39 LOADED geometries : track.cityscape.scrapers1 ( 1 / 44 ).
launch.js:39 LOADED geometries : bonus.base ( 2 / 44 ).
launch.js:39 LOADED geometries : booster ( 3 / 44 ).
launch.js:39 LOADED geometries : track.cityscape.scrapers2 ( 4 / 44 ).
launch.js:39 LOADED geometries : track.cityscape.start.banner ( 5 / 44 ).
launch.js:39 LOADED geometries : track.cityscape.start ( 6 / 44 ).
launch.js:39 LOADED geometries : track.cityscape.bonus.speed ( 7 / 44 ).
launch.js:39 LOADED textures : hex ( 8 / 44 ).
launch.js:39 LOADED geometries : ship.feisar ( 9 / 44 ).
launch.js:39 LOADED geometries : track.cityscape ( 10 / 44 ).
launch.js:39 LOADED textures : spark ( 11 / 44 ).
launch.js:39 LOADED textures : cloud ( 12 / 44 ).
launch.js:39 LOADED textures : ship.feisar.diffuse ( 13 / 44 ).
launch.js:39 LOADED textures : booster.sprite ( 14 / 44 ).
launch.js:39 LOADED textures : ship.feisar.specular ( 15 / 44 ).
launch.js:39 LOADED textures : ship.feisar.normal ( 16 / 44 ).
launch.js:39 LOADED textures : track.cityscape.scrapers1.diffuse ( 17 / 44 ).
launch.js:39 LOADED textures : booster.diffuse ( 18 / 44 ).
launch.js:39 LOADED textures : track.cityscape.specular ( 19 / 44 ).
launch.js:39 LOADED textures : track.cityscape.diffuse ( 20 / 44 ).
launch.js:39 LOADED textures : track.cityscape.normal ( 21 / 44 ).
launch.js:39 LOADED textures : track.cityscape.scrapers1.specular ( 22 / 44 ).
launch.js:39 LOADED textures : track.cityscape.scrapers2.normal ( 23 / 44 ).
launch.js:39 LOADED textures : track.cityscape.start.diffuse ( 24 / 44 ).
launch.js:39 LOADED textures : track.cityscape.scrapers1.normal ( 25 / 44 ).
launch.js:39 LOADED textures : track.cityscape.scrapers2.diffuse ( 26 / 44 ).
launch.js:39 LOADED textures : track.cityscape.scrapers2.specular ( 27 / 44 ).
launch.js:39 LOADED textures : track.cityscape.start.specular ( 28 / 44 ).
launch.js:39 LOADED textures : bonus.base.normal ( 29 / 44 ).
launch.js:39 LOADED textures : track.cityscape.start.banner ( 30 / 44 ).
launch.js:39 LOADED textures : track.cityscape.start.normal ( 31 / 44 ).
launch.js:39 LOADED textures : bonus.base.diffuse ( 32 / 44 ).
launch.js:39 LOADED textures : bonus.base.specular ( 33 / 44 ).
launch.js:39 LOADED images : hud.speed ( 34 / 44 ).
launch.js:39 LOADED texturesCube : skybox.dawnclouds ( 35 / 44 ).
launch.js:39 LOADED images : hud.bg ( 36 / 44 ).
launch.js:39 LOADED analysers : track.cityscape.collision ( 37 / 44 ).
launch.js:39 LOADED analysers : track.cityscape.height ( 38 / 44 ).
launch.js:39 LOADED images : hud.shield ( 39 / 44 ).

Touch control requires two fingers to accelerate

On Chrome browsers (I've tested Chrome on a Nexus 7 and Crosswalk on a ZTE Geek running Android), the touch controls for acceleration only work if you use two fingers on the right-hand side of the screen. This is very awkward.

I selected "Touch" for the control mechanism and "Mobile" for the platform.

How to make it work...

I've downloaded the project. I'm getting an error like
Uncaught exception: TypeError: Cannot convert 'k' to object
Error thrown at line 346, column 204 in (a) in file://localhost/E:/Projects/HexGL/HexGL-master/js/Three.dev.js:
throw"Error creating WebGL context.";
called from line 248, column 1 in () in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
var renderer = new THREE.WebGLRenderer({
called from line 65, column 1 in (opts) in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
this.initRenderer();
called from line 78, column 4 in init() in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
hexGL = new bkcore.hexgl.HexGL({
called from line 106, column 3 in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
init();

Error initially occurred at line 346, column 270 in (a) in file://localhost/E:/Projects/HexGL/HexGL-master/js/Three.dev.js:
a=k.getExtension("OES_texture_float");
called from line 248, column 1 in () in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
var renderer = new THREE.WebGLRenderer({
called from line 65, column 1 in (opts) in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
this.initRenderer();
called from line 78, column 4 in init() in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
hexGL = new bkcore.hexgl.HexGL({
called from line 106, column 3 in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
init(); Inline script thread index.html:346
Uncaught exception: TypeError: Cannot convert 'k' to objectError thrown at line 7549, column 3 in (a) in file://localhost/E:/Projects/HexGL/HexGL-master/js/Three.dev.js:
throw "Error creating WebGL context.";
called from line 173, column 1 in () in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
var renderer = new THREE.WebGLRenderer({
called from line 46, column 1 in (opts) in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
this.initRenderer();
called from line 78, column 4 in init() in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
hexGL = new bkcore.hexgl.HexGL({
called from line 106, column 3 in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
init();

Error initially occurred at line 7554, column 1 in (a) in file://localhost/E:/Projects/HexGL/HexGL-master/js/Three.dev.js:
a = k.getExtension("OES_texture_float");
called from line 173, column 1 in () in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
var renderer = new THREE.WebGLRenderer({
called from line 46, column 1 in (opts) in file://localhost/E:/Projects/HexGL/HexGL-master/bkcore/hexgl/HexGL.js:
this.initRenderer();
called from line 78, column 4 in init() in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
hexGL = new bkcore.hexgl.HexGL({
called from line 106, column 3 in file://localhost/E:/Projects/HexGL/HexGL-master/index.html:
init();

I'm running it on opera.. Win 7 64 bit, 6gb ram, nvidia 210... game works fine on the web... But not for the local machine

The Screen is Black

when i click the start button the showing screen is black.I can't play this game.

Black Screen

Screen turns black after clicking start and nothing happens

Error Embedding to wordpress site

Hello,

Any one here who experience the set velocity error? or any video tutorials on how to install this game to wamp server localhost??

Thanks in Advance!

Selecting the "mobile" platform disables too much UI feedback

If you select "mobile", the start and end conditions of the game are slightly confusing:

  • When you start, there's no countdown shown on screen, but the countdown is still applied. This means that applying acceleration in the first three seconds has no effect, but there's no feedback about why that is.
  • When your ship is destroyed, there's not enough visual feedback about what is happening. The screen goes slightly more red, then you are shown your time, but given no explanation about why the game ended.

I'd suggest that the countdown is shown at the beginning, regardless of platform; and that the player is told why the game ended, as they are in the desktop version ("Destroyed" or whatever).

Perhaps the HUD on/off setting could be made separate from the platform? The HUD doesn't seem to add much overhead (from my basic testing), and could be toggled on for some mobile platforms (e.g. powerful smart phones). Or maybe the application could just have "Quality" and "HUD" settings, not "Platform": the latter just appears to downgrade quality anyway (though I may have missed some subtleties).

How to activate reset

I dont understand how to activate the reset in the game.
Something about tabbing 4 times on the trust button.
Maybe it's not working ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.