Your First Phaser Game ⭐
- Due Jul 3, 2019 by 11:59pm
- Points 10
- Submitting a file upload
Your first assignment is to work through the "Making your first Phaser 2 game" Links to an external site.tutorial on the official Phaser site. However, there are some important differences:
- In "Part 1 - Introduction," you'll be asked to download source files and assets for use in the tutorial. Download these files for reference, but do not use them for your final submission. Instead, use the phaser bootstrap Download phaser bootstrap environment I covered in class (you can find a copy of it in the Canvas file section), move the assets into the appropriate folder in the bootstrap file structure, and type (not copy and paste) your code into main.js. (Why are we doing it this way? One, to help practice navigating file paths, and two, to better organize our projects. The tutorial uses a single HTML file to hold the entire project, and that's a pretty messy way to structure your games.)
- Also, if you go through the "Getting Started Guide Links to an external site." in the tutorial, please skip "Part 2 -Installing a web server" and "Part 3 - Run in the Cloud." Instead, use the python server commands we covered in class.
Your objective is to get the Phaser environment up and running (either in the lab or on your own computer), get the tutorial game working, and make some small tweaks.
Grading Criteria
You are graded according to the following rubric (point values in parentheses):
Organization (3 points)
- Logically comment the game source to demonstrate that you understand how each section works (for an example, see the image at the bottom of the assignment). Do not copy the tutorial's comments. (0.5)
- Assets are in proper folder (0.5)
- Code is in proper project file (0.5)
- Game runs from localhost (0.5) with no errors (0.5). (If the graders have to move folders or assets to get your game to work, they will mark a zero and ask you to resubmit in the project comments.)
- Submit your project to Canvas as a .zip file w/ the file name LastNameFirstNameTutorial.zip (0.5)
Code Changes (7 points)
- Change the game resolution to a vertical aspect ratio so the game is taller than it is wide. (0.5)
- Create a total of four platforms (0.5), each at a different vertical y-position on the screen (0.5), arranged so that at least one star falls on every platform (including the ground!) (0.5), and the player can reach every star (0.5).
- Create a new collectible game object. Use the 'diamond' image (0.5) and have it randomly spawn in mid-air at a new visible, onscreen location each time your game is reloaded (0.5). When the player collects the diamond, remove the diamond (0.5) and add 50 points to the player's score (0.5).
- Use the baddie.png spritesheet to create two identical enemies at different positions (0.5). Give the enemies physics so they stand on platforms (0.5). Using the provided spritesheet frames, have each enemy run in place (but not move) facing different directions (0.5) (Note: the baddie's spritesheet tile dimensions are 32x32). If the player collides with the baddie, remove the baddie (0.5) and deduct 25 points (0.5).
Your finished assignment should look something like this:
No late assignments accepted without prior permission.
Here's a sample of good commenting practice:
Rubric
Please include a title
Keep in mind that 16 students have already been assessed using this rubric. Changing it will affect their evaluations.
Criteria | Ratings | Pts |
---|---|---|
Proper commenting
threshold:
pts
|
pts
--
|
|
Assets in proper folder
threshold:
pts
|
pts
--
|
|
Code in proper file
threshold:
pts
|
pts
--
|
|
Game runs from localhost
threshold:
pts
|
pts
--
|
|
Game runs with no errors
threshold:
pts
|
pts
--
|
|
Game is zipped and properly named
threshold:
pts
|
pts
--
|
|
Vertical aspect ratio
threshold:
pts
|
pts
--
|
|
Four platforms
threshold:
pts
|
pts
--
|
|
Platforms at different y-heights
threshold:
pts
|
pts
--
|
|
Star falls on each platform (including ground)
threshold:
pts
|
pts
--
|
|
All stars collectable
threshold:
pts
|
pts
--
|
|
Use diamond asset
threshold:
pts
|
pts
--
|
|
Diamond spawns randomly in mid-air
threshold:
pts
|
pts
--
|
|
Remove diamond when collected
threshold:
pts
|
pts
--
|
|
Diamond awards 50 points
threshold:
pts
|
pts
--
|
|
Create two enemies at different position using baddie sprite
threshold:
pts
|
pts
--
|
|
Enemies stand on platforms
threshold:
pts
|
pts
--
|
|
Enemies animate in different directions
threshold:
pts
|
pts
--
|
|
Baddies collide with player and disappear
threshold:
pts
|
pts
--
|
|
Baddie collision deducts 25 points
threshold:
pts
|
pts
--
|