Jump to content

Issues on Ubuntu - Black/Blank Canvas


AD-Edge
 Share

Recommended Posts

Hey guys

New to phaser and this forum, and Ive now run into my first issue!

 

Tonight I've been working though the typescript 'getting started' page, setting up my phaser game-dev environment on Ubuntu 13.04. I have apache2, php and mysql working, with the default test page in /var/www running fine (basically have LAMP setup and running).

I'm stuck however, trying to run the hellophaser demo. The canvas comes up as completely black, no logo or anything. Not sure whats gone wrong...

 

Heres how it looks:

edDwAn4.png

 

If anyone has any suggestions, that would be great. I'll keep working at it, to see if I can find a solution. 

 

 

Also, absolutely loving Sublime2, today was my first time using it and I cant see myself going back to the text editors IDEs I have been using (unless I really have to for some feature or IDE that is). The mini-code scrollbar is amazing, as someone whos always getting lost in large scripts. 

 

-Alex

Link to comment
Share on other sites

Actually never mind - I can see the problem from the screen shot. You've opened the raw html file into Chrome as a file, maybe by dragging it into your browser window. You can't do it like that, Chrome doesn't have permissions to access your local file system (and nor should it ever have!) - you need to run a web server locally and serve the page to the browser. As you're on Ubuntu you've got this already, so try browsing to 'localhost' or similar, whatever your server is configured to serve on.

Link to comment
Share on other sites

Ahu! The chrome console printed out something helpful 'phaser-min.js:1Cross-origin image load denied by Cross-Origin Resource Sharing policy.' Which is, I believe, attributed to what youre saying Rich. 

 

I found a solution via google - starting chrome with the command 'google-chrome --allow-file-access-from-files' 

 

All is working now, cheers everyone.

Link to comment
Share on other sites

Yeh I should have mentioned, somewhat opens things up to security risks...

 

 

You just have to request the page from the server, that's all.

 

How is this done? I'm not overly familiar with running code from a locally hosted server. Not using the -allow-file-access enabled command would certainly make life easier.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...