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 trialAbdallah El Kabbany
2,042 Pointsthe game is not launched when i hit preview neither here not the first video
please help
2 Answers
Jonathan Grieve
Treehouse Moderator 91,253 PointsHi Abdallah,
This has thrown me a couple of times too, because as a Front End language, you would expect JavaScript commands to work in the local browser right out of the box.
However, the game used in this example is built on a framework called "phaser.js" which requires a server to work. The good news is you don't need to use a web host for development. I have my version of the software running right not my XAMPP local server as I try to build out the game.
If you haven't already try installing a local server on your computer and putting your files there! :-)
Good luck!
Lizzie Bailey
1,734 PointsIf you're on windows, you can turn on IIS in order to allow it to serve phaser.js - here's a link on how to do this: https://gist.github.com/jgravois/5e73b56fa7756fd00b89 That solved the problem for me :)