Assignment 6: Pokemon
- 💯 Worth: 6%
- 📅 Due: See due date on Moodle.
- 🚫 Penalty: Late submissions lose 10% per day to a maximum of 3 days. Nothing is accepted after 3 days and a grade of 0% will be given.
🎯 Objectives
Section titled “🎯 Objectives”- Read and understand all of the Pokemon notes and source code.
- Implement a run feature that allows the player to exit a battle before their Pokemon faints.
- Implement a Menu that appears during the player Pokémon’s level up that shows how much each state went up by.
- Implement health and experience progress bars for a sleeker looking UI.
🔨 Setup
Section titled “🔨 Setup”- Fork (do not download as a zip) the starter repository from GitHub. Make sure you use the link from Moodle to fork the proper repository for this assignment.
- Start Live Server in VSC by right-clicking on
index.htmland selecting Open with Live Server. This will open a new tab in your browser with the game running. - If you have an ad blocker, turn it off for localhost.
🔍 Context
Section titled “🔍 Context”To complete this assignment, you should read and understand all of the Pokemon notes and source code.
Welcome to your seventh (and final) assignment! This week’s code is probably the most complicated we’ve looked at during the semester, and you will need to know how many of the pieces work and fit together in order to accomplish the task ahead.
The grass animations and battle transitions are not requirements for the assignment, I just got carried away while making the demo video. 😅
For this assignment, you must choose one of the two feature sets below to implement, Battle Feature Set or Exploration Feature Set. Both sets are of equal difficulty and worth the same amount of points.
⚔️ Battle Feature Set (90%)
Section titled “⚔️ Battle Feature Set (90%)”If you choose the Battle Feature Set, you must implement all of the following features:
🏃🏾♀️ Run
Section titled “🏃🏾♀️ Run”Implement a run feature that allows the player to exit a battle before their Pokémon faints. The player should be able to select “Run” from the battle menu, which will end the battle and return them to the play state.
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | Run option is not present in the battle menu. |
| (-2) | Run option exists but does not return to the play state. |
| (-1) | State instantly pops instead of fading. |
| (-X) | Other reason detailed in comments. |
| (-3) | N/A |
🧮 Stat Change Panel
Section titled “🧮 Stat Change Panel”Implement a panel that appears during the player Pokémon’s level up that shows, for each stat, X > Y, where X is the old stat and Y is the new stat. This panel should appear right after the “Level Up” dialogue that appears at the end of a victory where the player has indeed leveled up.
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | Panel does not display old and new stat values. |
| (-1) | Panel does not appear after level up dialogue. |
| (-1) | Not all stats are shown (health, attack, defense, speed). |
| (-X) | Other reason detailed in comments. |
| (-4) | N/A |
🔄️ Progress Bars
Section titled “🔄️ Progress Bars”Implement health and experience progress bars for a sleeker looking UI. They should clearly indicate that health/experience values are being tweened accordingly.
The health bars should deplete when either Pokémon takes damage in a battle.
- When their health is <= 100%, the bar should be green.
- When their health is <= 50%, the bar should be yellow.
- When their health is <= 25%, the bar should be red.
- The player Pokémon’s health should still have the text indicator (ex.
4/12) as well as the bar, whereas the opponent Pokémon’s health should only have the bar. - The text indicator should update in real-time as the health bar depletes.
When the player’s Pokémon wins a battle, their experience bar should fill up based on the amount of experience they gained and should play the experience-gain.ogg sound. The opponent Pokémon does not have an experience bar.
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-2) | Health bars do not deplete when Pokémon take damage. |
| (-1) | Health bar colors do not change based on health percentage. |
| (-2) | Experience bar does not fill up after winning a battle. |
| (-1) | Player Pokémon health bar number values are not tweened. |
| (-1) | Experience gain sound is not played. |
| (-X) | Other reason detailed in comments. |
| (-6) | N/A |
💥 Moves
Section titled “💥 Moves”Implement a move system where Pokémon can have up to 4 different moves instead of just “Fight”. Each move should have its own name and damage value. The starter code only has a basic “Fight” option that does fixed damage so you’ll need to expand this.
Each Pokémon should have a set of moves (look inside pokemon.json), and each move should have properties like name and damage which you should add to moves.json.
The user interface should allow the player to select which move to use in battle. When the player chooses to attack, they should see a grid of their Pokémon’s available moves (up to 4).
The UI should:
- Display all available moves in a 2x2 grid
- Show empty slots with a hyphen (-) if the Pokémon knows fewer than 4 moves
- Allow the player to navigate through moves using arrow keys
- Display the selected move’s name clearly
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | Moves are not loaded from JSON files correctly. |
| (-1) | Pokémon cannot have up to 4 moves. |
| (-1) | Move selection UI is not implemented. |
| (-1) | Cannot navigate through moves with arrow keys. |
| (-1) | Empty move slots are not shown with a hyphen. |
| (-1) | Damage calculation does not use the move’s damage value. |
| (-1) | UI sounds are not accurate to the video. |
| (-X) | Other reason detailed in comments. |
| (-5) | N/A |
🔥 Type Effectiveness
Section titled “🔥 Type Effectiveness”Implement a type system where moves and Pokémon have types (Fire, Water, Grass, etc.), and moves are more or less effective based on type matchups. When a move is used, display a message indicating if it was “super effective!” (2x damage) or “not very effective…” (0.5x damage).
Each Pokémon should have a type (already in pokemon.json), and each move should have a type (already in moves.json). Use the type effectiveness chart below to determine the damage multiplier.
| Move Type ↓ / Defender Type → | Fire | Water | Grass | Normal |
|---|---|---|---|---|
| Fire | 1x | 0.5x | 2x | 1x |
| Water | 2x | 1x | 0.5x | 1x |
| Grass | 0.5x | 2x | 1x | 1x |
| Normal | 1x | 1x | 1x | 1x |
- 2x = Super effective! (display message and play
hit-super-effective.wavsound) - 1x = Normal damage (no message, play
hit-regular.wavsound) - 0.5x = Not very effective… (display message and play
hit-not-effective.wavsound)
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | Type effectiveness chart is not implemented correctly. |
| (-1) | Damage multiplier is not applied to move damage. |
| (-1) | “Super effective!” message is not displayed when appropriate. |
| (-1) | “Not very effective…” message is not displayed when appropriate. |
| (-1) | Appropriate sounds are not played for the type effectiveness. |
| (-X) | Other reason detailed in comments. |
| (-3) | N/A |
📍 Exploration Feature Set (90%)
Section titled “📍 Exploration Feature Set (90%)”If you choose the Exploration Feature Set, you must implement all of the following features:
🏠 Player House Map
Section titled “🏠 Player House Map”Create the player’s house interior map using the Tiled map editor. You’ll need to design the map using the provided player-house.png tileset.
The house should:
- Be created in Tiled using the
player-house.pngsprite sheet as your tileset - Have proper collision detection (walls, furniture)
- Have three layers: Bottom, Collision, and Top
- Be exported as JSON and placed in the
configfolder - Be loaded in your game code and made accessible from the town map
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | Map is missing one or more required layers. |
| (-1) | Collision detection is not working properly. |
| (-1) | Map is not exported as JSON or not placed in correct folder. |
| (-1) | Map is not loaded in the game code. |
| (-X) | Other reason detailed in comments. |
| (-4) | N/A |
🚪 Door Transitions
Section titled “🚪 Door Transitions”Implement the ability for the player to enter and exit the house using doors with proper animations.
Entering the house (walking UP):
- From the tile below the door, player attempts to walk UP onto the door tile
- Player pauses briefly
- The door sprite changes from CLOSED to OPEN and plays the sound effect
- Player animates walking one tile UP onto the door tile
- Screen fades to black
- Map changes to house interior
- Screen fades in, player is on the doormat inside
Exiting the house (walking DOWN):
- Player walks onto the doormat and presses DOWN to exit
- Screen fades to black
- Map changes to town exterior
- Door sprite is already OPEN
- Screen fades in
- Player appears on the door tile
- Player animates walking one tile DOWN below the door tile
- Door sprite changes from OPEN to CLOSED behind them
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | Player cannot enter the house through the door. |
| (-1) | Player cannot exit the house through the door. |
| (-1) | Door does not open when entering. |
| (-1) | Door does not close after exiting. |
| (-1) | No sound effect plays when door opens. |
| (-1) | No fade transition between maps. |
| (-X) | Other reason detailed in comments. |
| (-6) | N/A |
👥 Town NPC
Section titled “👥 Town NPC”Add an NPC to the town map that the player can interact with. The NPC should:
- Have a sprite rendered on the map (sprite data provided in
npcs.json) - Be positioned at a specific location in the world
- Have collision detection so the player can’t walk through them
- Display dialogue when the player interacts with them with the space or enter key
- Walk around randomly
- Change directions occasionally
- Not walk through walls or other entities
- Turn to face the player when interacted with
- Pause walking while the player is talking to them
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | NPC sprite is not rendered on the map. |
| (-1) | NPC does not have collision detection. |
| (-1) | NPC does not display dialogue when interacted with. |
| (-1) | NPC does not walk around randomly. |
| (-1) | NPC walks through walls or other entities. |
| (-1) | NPC does not turn to face the player when interacted with. |
| (-X) | Other reason detailed in comments. |
| (-8) | N/A |
👩 Mom NPC
Section titled “👩 Mom NPC”Add Mom as an NPC inside the player’s house. Mom should:
- Have a sprite rendered in the house (sprite data provided in
npcs.json) - Be positioned at one of the chairs in the house facing the table
- Have collision detection
- Display dialogue when the player interacts with her
- Remain stationary (no walking behavior required)
| Deduction | Criteria |
|---|---|
| (-0) | Correct |
| (-1) | Mom sprite is not rendered in the house. |
| (-1) | Mom does not have collision detection. |
| (-1) | Cannot interact with Mom using space or enter key. |
| (-1) | Mom does not display dialogue when interacted with. |
| (-X) | Other reason detailed in comments. |
| (-3) | N/A |
💡 Work Smarter
Section titled “💡 Work Smarter”- You’re going to be starting the game over and over and over again, dozens of times. Instead of going through the title screen every time you refresh, make it so that you start in the play state from the outset.
- When testing a particular feature you’re implementing, hardcode the parameters to work to your advantage.
- For example, when working on the progress bars, set up your environment so that you always start in a battle right away instead of having to walk through grass every time to encounter a Pokemon.
Taking the time at the beginning to set up your game in a state that is conducive to testing will save you tons of time down the road - trust me! And this isn’t just for game programming, this goes for any type of development you do. 😉
📝 Dev Log (5%)
Section titled “📝 Dev Log (5%)”You’ll find a .devlog.md file in the project root. This file is your design diary. It’s where you document how you approached the assignment, what decisions you made, what challenges you encountered, and how you worked through them, including how you used any AI tools.
This is not a summary of your final product (that’s what your code and commit messages show). Instead, it’s a reflection of your process and thinking.
What to write:
- What approach you chose and why
- Any bugs or roadblocks you encountered and how you solved them
- How you tested and verified your implementation
- If you used AI tools (e.g. ChatGPT, Claude, Copilot), describe:
- What you asked
- What it returned
- What you kept or changed
- Include links to relevant chat logs when possible
What makes a good devlog:
- Specific technical insights (e.g. “I struggled with connecting the AI paddle’s movement to the ball’s position. I solved this by…”)
- Honest reflection on what you understood and what confused you
- Commentary on any AI output you received, what was useful, what wasn’t
What makes a weak devlog:
- Restating the assignment prompt
- Only describing what the final code does, without process
- Hiding or omitting AI tool usage
- Generic statements with no technical substance
Be concise. Bullet points are fine.
| Criteria | Standard |
|---|---|
| Process Reflection | Clear explanation of approach, design decisions, and problem-solving steps |
| Technical Detail | Specifics about code structure, logic, or bugs encountered and fixed |
| AI Usage Disclosure | Clearly explains how AI was used, what was kept/changed, with reasoning |
| Insight & Critical Thinking | Thoughtful reflection on what was learned, understood, or found challenging |
| Clarity & Format | Concise, readable, well-structured with bullet points or short paragraphs |
🤖 AI Involvement Category
Section titled “🤖 AI Involvement Category”At the top of your .devlog.md, you must declare your AI involvement category by selecting the option that best describes how you used AI during the assignment:
| Category | Description |
|---|---|
| No Use | You did not use any AI tools at any point. |
| Tutor | You used AI to explain code, concepts, or errors. No code was generated by AI. |
| Assistant | You asked AI for code suggestions or snippets and integrated them with understanding. |
| Reviewer | You wrote the code yourself, then used AI to review, critique, or suggest improvements. |
💬 Peer Assessment (5%)
Section titled “💬 Peer Assessment (5%)”You’ll use the Moodle Workshop feature to give feedback on 3 of your peers’ submissions. Peer assessment is a core developer skill. Reading others’ code and giving constructive feedback is something you’ll do constantly in real software teams. It also helps you improve your own work by seeing how others solved the same problem.
💻 Code Walkthrough
Section titled “💻 Code Walkthrough”For each assignment, I will randomly select a few students for a short (10-15 minute) one-on-one code walkthrough. You’ll be asked to explain your implementation, reflect on your design decisions, and answer a few questions. This helps ensure understanding, promotes academic integrity, and prepares you to communicate your work which is an essential skill for every developer. You can be selected for any assignment, so always be ready to walk me through your code.
We will be using GitHub and Gradescope to submit in this course. You can use either the Git CLI or you can also use VSC’s built-in Git GUI client.
| Visual Studio Code (GUI) | Command Line (CLI) | |
|---|---|---|
| 1 | Click the Source Control icon (third down on the left sidebar) | git status - View changed files |
| 2 | Click + to stage all changes, or + next to individual files | git add . or git add <filename> - Stage changes |
| 3 | Type a commit message in the text box, then click the ✔ to commit | git commit -m "Your message" - Commit staged changes |
| 4 | Click ... and choose Push to upload your commit to GitHub | git push - Push commits to GitHub |
Commit frequently. It’s good practice, and it also creates a traceable history of your progress.
📥 Submission
Section titled “📥 Submission”Before submitting your assignment, ensure that your map includes all the necessary elements for your peers to properly evaluate your submission. Ensure all relevant features are included and testable in your map, and describe them clearly when you submit.
- Go to Gradescope, click the link for this assignment, select the correct repository and branch from the dropdown menus, and click
Upload. - Go to Moodle and click the link for this assignment in the calendar.
- Click the blue
Add Submissionbutton at the top of the workshop page.- Title: A6 Pokemon Submission.
- Submission content: Describe which features you implemented in the description of the workshop submission along with anything your reviewers should know about your game/code.
- Zip your assignment folder and attach it as a file. To ensure anonymity:
- DO NOT include your name in any of the files or folders
- DO NOT include the
.gitfolder before zipping, otherwise it will contain your commit history which has your name and email in it - Optionally, you may include your
.devlog.mdfile if you want to share your design diary with your reviewers
- Click the
Save changesbutton at the bottom. - You’ll be able to start assessing your peers the day after the assignment is due.