Awesome-Game-Team / Awesome-Game

An Awesome Game
GNU General Public License v3.0
8 stars 9 forks source link

Play area only shows black rectangle #13

Closed jonpatterns closed 8 years ago

jonpatterns commented 8 years ago

Hi

I'm using Firefox 46.0.1 on Linux 4.1.23-1-MANJARO #1 SMP PREEMPT

When the game launches, via clicking on the hosted link, the play area only shows a black rectangle - with nothing else shown. The music is playing. Fullscreen goes to a completely black screen (apart from "Press Esc to exit fullscreen" message).

jimfrize commented 8 years ago

Hi @jonpatterns, can you look at the error console in Firefox to see if you have any errors?

jonpatterns commented 8 years ago

Do you mean the 'web console'? There seems to be a problem with 1280x720 not being able.

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. Awesome-Game "Phaser v2.4.6 | Pixi.js v2.2.9 | WebGL | WebAudio | http://phaser.io" phaser.min.js:11:27946 Error: WebGL: Error during native OpenGL init. phaser.min.js:17:17250 Error: WebGL: Error during native OpenGL init. phaser.min.js:7:25102 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:25102 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26643 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26670 'mozHidden' and 'mozVisibilityState' are deprecated. Please use the unprefixed 'hidden' and 'visibilityState' instead. phaser.min.js:11:4286 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26643 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26670 Error: WebGL: texImage2D: Requested size at this level is unsupported. phaser.min.js:7:27246 Error: WebGL: drawElements: Drawing to a destination rect smaller than the viewport rect. (This warning will only be given once) phaser.min.js:8:9246 Error: WebGL: texImage2D: Requested size at this level is unsupported. phaser.min.js:7:27246 Error: WebGL: texImage2D: Requested size at this level is unsupported.

jimfrize commented 8 years ago

@jonpatterns yup, that's what I was after :)

Try this page: https://get.webgl.org

It should let you know if you have WebGL installed correctly on your system. If it's working properly the web page will tell you "Your browser supports WebGL" and you should see a nice spinning cube.

Let me know how you get on.

jonpatterns commented 8 years ago

I get the spinning cube and 'Your browser supports WebGL' message.

jimfrize commented 8 years ago

@jonpatterns hummm, so that's all good. Do you have another browser you can test, to see if this is an issue only when using Firefox?

metalx1000 commented 8 years ago

This is interesting. Seems like your system supports WebGL, but even if it didn't the game should default to Canvas rendering.

Just tested it on my Debian machine with Firefox 45.1.0, and all is good here. I'm bad at declared character encoding, which is just one line at the top of the document. I'll add that now.

@jonpatterns can you test it with this link: http://filmsbykris.com/tmp/Awesome-Game/

It's the same exact game, but I lowered the resolution (which currently crops out a lot of your view), but if that works, it will at lest give us a direction to look into.

metalx1000 commented 8 years ago

@jonpatterns I added the meta tag for charset. I don't think that would cause this problem, but you never know. So, give this a try now: http://filmsbykris.com/scripts/Awesome-Game/

Let me know if that or the link with the lower resolution work.

jimfrize commented 8 years ago

@metalx1000 Interesting, the game play is totally different in low res. It's quite nice not being able to see so much of the map.

metalx1000 commented 8 years ago

@jimfrize I was kinda thinking the same thing. I think that might be to close, but somewhere in the middle might be better.

jonpatterns commented 8 years ago

Thanks for the replies, I'll answer in turn:

The game works in Chromium 50.0.2661.94 and Seamonkey 2.4 (although is very slow in Seamonkey).

Smaller screen works in Firefox! (and Chromium and Seamonkey) http://filmsbykris.com/tmp/Awesome-Game/

Bigger screen still doesn't work in Firefox

"Phaser v2.4.6 | Pixi.js v2.2.9 | WebGL | WebAudio | http://phaser.io" phaser.min.js:11:27940 Error: WebGL: Error during native OpenGL init. phaser.min.js:17:17250 Error: WebGL: Error during native OpenGL init. phaser.min.js:7:25102 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:25102 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26643 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26670 'mozHidden' and 'mozVisibilityState' are deprecated. Please use the unprefixed 'hidden' and 'visibilityState' instead. phaser.min.js:11:4286 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26643 Error: WebGL: Requested size 1280x720 was too large, but resize to 640x360 succeeded. phaser.min.js:7:26670 Error: WebGL: texImage2D: Requested size at this level is unsupported. phaser.min.js:7:27246 Error: WebGL: drawElements: Drawing to a destination rect smaller than the viewport rect. (This warning will only be given once) phaser.min.js:8:9246 Error: WebGL: texImage2D: Requested size at this level is unsupported. phaser.min.js:7:27246 Error: WebGL: texImage2D: Requested size at this level is unsupported. phaser.min.js:7:27246 Error: WebGL: texImage2D: Requested size at this level is unsupported.

jimfrize commented 8 years ago

Thankyou @jonpatterns this is all really helpful :)

Hopefully we can figure out a way of having hi-res in Firefox soon

metalx1000 commented 8 years ago

I think for now we'll lower the resolution (no need for it to be HD anyway), and later work on scaling the game down a little to fit better in the lower rez setup. It should be easy to do, I just need to look into it.

metalx1000 commented 8 years ago

I'm going to close this since we fixed it by lowering the resolution.