Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Learn how to use "sprites" in a JavaScript game; how to call functions; and how values add flexibility to your functions.
Coordinates for new items
- Poison bottle: 370, 500
- Poison bottle: 100, 375
- Star: 125, 50
Downloading and Running the Project Files
Because of how the Phaser.JS library handles files, you need to be running a web server locally to view a working copy of this project. You can't just open the index.html file in your web browser as you might a basic HTML page. There are several simple ways to get a web server up and running on your computer:
- The Web Server for Chrome is an easy-to-install extension for Chrome that lets you select a folder on your computer (like the folder with the game files in them) and deliver them through a basic web server. This is probably the easiest way to get started — but you'll need to use the Chrome web browser.
- If you don't want to use Chrome, check out a simple guide for getting a local web server set up for several other methods.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Gerald Susanteo
Front End Web Development Techdegree Student 7,117 Points1 Answer
-
Alexandra Velez
Front End Web Development Techdegree Student 9,313 Points1 Answer
-
KAMRAN IMRANLI
4,107 Points4 Answers
-
Mateo Sanders
103 PointsOnce i preview my workspace, it redirects me into this: http://port-80-49vrnwa7ay.treehouse-app.com/
1 Answer
-
PLUS
Johnny Nobles
Courses Plus Student 1,157 Points1 Answer
-
Chiedza Chimhanda
1,927 Points2 Answers
-
Michael Molaro
730 Points1 Answer
-
Brandon Schneider
2,123 Points1 Answer
-
Angel Plaza
3,865 Points1 Answer
-
Nelson Pamplona
1,575 Points2 Answers
-
Trevor Schliefer
Full Stack JavaScript Techdegree Student 222 Points1 Answer
-
Matthew Earlywine
3,508 Points5 Answers
-
Matthew Earlywine
3,508 Points1 Answer
-
Claude Fiddler
105 Points2 Answers
-
PLUS
Daniel Sanchez
Courses Plus Student 1,136 Points1 Answer
-
Ethan Raddatz
65 Points3 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up