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

Chrome issues when uploaded to web server? #1

Open
Rhyspacker opened this issue Feb 4, 2014 · 3 comments
Open

Chrome issues when uploaded to web server? #1

Rhyspacker opened this issue Feb 4, 2014 · 3 comments

Comments

@Rhyspacker
Copy link

When uploading the code to my web server for live editing and experimenting, I notice that it doesn't load at all in chrome, it simply crashes the page but in firefox and safari it works fine.

Wondering if this has been fixed or someone knows how to put it right.

http://rhyspacker.com/gamedemo/lim.html

Thanks,
Rhys.

@Rhyspacker
Copy link
Author

Now I've looked into it, it seems that chrome (latest version) isn't running the scrolling background function, and not loading the rest in the process.

@JBizz
Copy link

JBizz commented May 6, 2014

The image width and height values in the Background function are what the issue is. The easiest fix is just to put in the actual background size of the image you are using. Chrome will not detect the image attributes and this is what is causing the error. I tried using an onload function to no avail, so I just hard coded in the size of the background. It will work after doing this. If you are using the background provided just put 400 and 400:
while (x < W) {
var y = 0;
while (y < H) {
c.drawImage(this.image, x, y, 400, 400);
y += 400;
}
x += 400;
}

@mimshwright
Copy link
Owner

I appreciate you guys tracking these bugs. I'm really busy lately but feel free to make some fixes and do a pull request.

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

3 participants