Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game is broken #42

Open
ronlaws86 opened this issue Aug 16, 2017 · 5 comments
Open

Game is broken #42

ronlaws86 opened this issue Aug 16, 2017 · 5 comments

Comments

@ronlaws86
Copy link

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 ).
@epikao
Copy link

epikao commented Dec 20, 2018

I have the same problem, is there in the meantime a solution available?

@kristian-lange-tw
Copy link

Ping

@0x6373
Copy link

0x6373 commented Apr 24, 2019

I got it to work by commenting out line 140 in bkcore/Audio.js so it looks like this:

bkcore.Audio.setListenerVelocity = function(vec){
  if(bkcore.Audio._ctx){
    var panner = bkcore.Audio._panner;
    //panner.setVelocity(vec.x, vec.y, vec.z);
  }
};

This is no solution, just a workaround since setVelocity has been deprecated.

huningxin added a commit to huningxin/HexGL that referenced this issue Jul 12, 2019
@binary-person
Copy link

binary-person commented Dec 31, 2019

Ik this has been a while, but it is an issue in other games too. Mozilla's compatibility charts tells us that all browsers except safari and edge don't support setVelocity, This suggests that the developer used either safari or edge browser to code the game. Reference: https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/setVelocity

EDIT: Never mind, I was an idiot and didn't read the whole thing.
According to Mozilla Documentation

This method was removed from the specification because of gaps in its design and implementation problems.

So my suggestion is just removing it all together. So @0x6373, I don't think there is even a solution. Since this is going to be unfixable anyhow, unless they reimplement setVelocity

@ghost
Copy link

ghost commented Jul 3, 2021

I tried it in chrome,samsung internet,opera android but it loading takes more than 1 day.I cann't see the end f loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@0x6373 @ronlaws86 @binary-person @epikao @kristian-lange-tw and others