Fire Fighting Simulator. How?

I have decided to use a fire hose instead of a fire extinguisher.

Untitled

These things. These are scenes we always see in movies and TV shows. I personally associate this fire hose to cool badass fire fighters and how they look so cool while doing it. Somehow a fire extinguisher is always associated to this clumsy clunky scene where someone accidentally sets their sofa on fire and the main character runs to find an extinguisher to fight it.

As for the type of gameplay i have in my head, it will be similar to an example shown in class.

Screenshot 2024-04-26 at 8.50.09 PM.png

https://editor.p5js.org/clement.zheng/sketches/Z0UcdXTOA

Instead of having circular random buttons that randomly display over the screen, I will replace it with a fire GIF (Yes i have decided to use gifs). The mechanism will be similar. Hands over the coordinates of the buttons for a few seconds which will then extinguish the fire.

I imagine it to be a timed based game to really push the adrenaline rush and create this sense of urgency. Which very much replicates real firefighters when they enter a scene.

Adapting the code

Untitled

I tried to replace the button with the fire. That was my goal.

Screenshot 2024-04-26 at 8.57.32 PM.png

I was able to switch out the buttons for the fire. I then checked in with ChatGPT to make sure the fire location randomises on screen.

Problems is faced

After randomising the location of the fire, there are times where the fire is partially outside of the display area. So i had to create a boundary to ensure that the fire only randomises within the set x-y coordinates that i’ve set.