Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Introducing JavaScript Let's Make a Game Welcome to Programming

James Reynolds
James Reynolds
3,182 Points

The game is not loading. I tried the preview from workspace and I tried downloading the files and using sublime

Using sublime: Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at file:///Users/James/Desktop/introducing_javascript/01_welcome/chalkers.png may not be loaded.

Using workspace: Failed to load resource: the server responded with a status of 404 (Not Found) Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at https://port-80-4u2barplpc.treehouse-app.com/chalkers.png may not be loaded.

The screen loads but the game elements do not appear

If you're running this on your local machine, you may run into Cross-Origin-Restriction policy.

https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy

Unless your using Treehouse Workspace, you may need to run a local web server to load your applications, and its assets (.png) files. My recommendation is using MAMP.

https://www.mamp.info/en/

Please view the readme instruction to find where to store your file/folder as per OSX or Windows users