Jump to content

Chrome JS Game to Work Locally?


paulmo

Recommended Posts

Want to get this Chrome/Chromium Game to work locally. So I put contents of offline.js in body of an HTML file, with no divs etc. since it's making its own with createElement. First, getting unexpected ( token syntax error on this:

<script>function () {'use strict';

So I commented it and closing } (); out, which prevents errors, but game is not rendering in Chromium window when I open HTML file. Suggestions how to get this game working locally?

Link to comment
Share on other sites

Certain security features might be preventing Google Chrome from using some image resources. When a canvas is drawn on by an image loaded from another website it is considered tainted and its image data cannot be used to draw on another canvas. Chrome possibly applies this restriction to files loaded locally from the computer as well.

 

Are you sure no error messages are showing up on the console?

Link to comment
Share on other sites

If you want to find out if things are missing then use your browser's developer tools to check the Network tab, look for any requests that are failing.If nothing is failing, and there are no error messages, then you need to use the debugger to set some breakpoints and just step through the code to see exactly what it's doing, and where it stops (any why).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...