Jump to content

Issues on Ubuntu - Black/Blank Canvas


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 post
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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...