Week 14 & 15 - Final Project
Week 14 & 15 - Final Project
Start Screen
Original Sketch
End Result
For the final project, I decided to use Concept #2 from my week 10 Final Project Planning & Inventory assignment. This concept outlines a game where the user must drag and drop sushi dishes to the correct cat so they can start their party. I chose this concept because it is complex enough to showcase many of the skills I have learned this semester in a cohesive way. I also wanted to make something that has a clear narrative with a satisfactory ending. To tie it all together, I feel like the thematic material, color scheme, and imagery relates back to my personal design style, which tends to be colorful and whimsical. Below I will compare and contrast between the original plan modules from the Week 10 assignment and the final outcome.
Module 1 - Background
The plan for the main static elements stayed relatively the same, including the background of a room, and the foreground with the table and the cats. These elements are royalty free images found on pixabay and rawpixel. I adjusted the size and removed any unwanted background of each element in Photoshop prior to placing in the sketch as PImages. I put the cats into their own array to help organize the code.
Module 2 - Basket Button
One aspect that I changed from the original plan was that I was going to have the sushi be stored in a picnic basket that the user would click to open. Instead, I decided to display them on a tray. I think this is a better depiction of these items because the actual setting of the game ended up being more of a restaurant setting rather than a picnic. It also allowed for the addition of the clues that I placed under each dish. The clues are colored circles that correspond to matching ones on the table.
Module 3 - Array of Sushi Items
In addition to the original plan to have the sushi items in an array, I also used arrays for the targets for each sushi item, as well as to contain the images of the cats and their party hats (seen on the end screen). This helped keep the code neat and organized, as well as to pair each item with its specific target for game functionality.
Module 4 - Function to Switch Between Items
Originally I thought I was going to have to toggle between each sushi item before the user could select it, but that is not the case. The functions that are used can select each item, determine if they are picked up and dropped, and if they are dropped onto the correct target or not, as well as if all the items have been correctly placed to trigger the win condition.
Module 5 - Function to Drag and Drop Items
The original plan was to use my ice cream cone stamping function but modify it to create the individual sushi items. However this approach was going to be more complicated than necessary because I would have to reload the whole background continuously while making a separate function for the targets. I decided to utilize ChatGPT to help create two sets of arrays, one for the sushi items, and the other for their intended locations, and have them correlate to each other. The way these functions work is listed above. I was then able to alter to coordinates of the items in each array, replace the sushi item placeholders with royalty free PNGs I had found, and to make the targets "invisible".
Module 6 - Condition to Match Items to Correct Place
Originally, I was going to have messages display if the user correctly placed the items or to display a message if they were not correct and needed to try again. After I began the project however, I thought it would look more "finished" if I added a start and end screen. So now when the user wins, it takes them to the end screen with a congratulatory message and a cute image of the cats at their party.
Module 7 - Ending animation
The ending animation was going to be confetti, but as described above I decided to use a conditional to switch to an end screen instead. I feel like this gives the game more of a feeling of completion than the original plan.
Course Topics Used:
Basic Shapes, Images, Variables, Conditionals, Functions, Classes, Arrays, Text, Algorithms
Challenges and Solutions:
Along with the challenges and solutions listed above, I noticed there was a glitch with one of the sushi items. It seems that if that particular item (the one that corresponds with the red circle clue), is used in certain instances, such as if it is not placed last, will trigger an "early win" and take the user to the end screen before all the items are placed. I also noticed that sometimes you could still win the game even if some of the items were placed incorrectly, as long as they were all placed. The solution to this was to utilize ChatGPT to troubleshoot where this glitch might be happening. At first I tried just asking it why this was happening, but I think there was just too much code to work through, so I went backwards step by step until I noticed that I originally had the gameWon function equal to allItemsPlaced, which I think was confusing it. Once I figured this out, I was able to figure out the correction, so now the win condition works properly and will not trigger early if the items are not all placed yet or if are placed incorrectly.