Food Game Feb - May 2023
- Kaz Thomas
- Jun 14, 2025
- 3 min read

A game I made in Processing, as part of my Creative Computing Foundation Year, that was selected to be part of the University of Portsmouth's Graduate Showcase.
9th Feb-
In the IDE known as Processing, I have begun to develop a game based on all the techniques I have developed so far:
I've been able to have the game centered around the Player square willingly go up and eat the balls to get a higher food score. And for each ball they eat it disappears from the screen by using ballList.remove(i) in the check collision function. It checks to see if the player collides with the ball, and then as it says if it does removes it from the list so the number of balls on screen go down accordingly. The reason for this games creation was I at first had some trouble with having all the balls have a hit detection with the player at first. But if I changed things around and made it remove instead of the issue I was having as before only 1 ball would trigger the hit detection and wasn't working with every ball on the screen. But this somehow works and I've been able to draw inspiration from my previous projects such as my comic book getting it to display level complete when all 20 balls are eaten, and using my counter from another project to count the amount of foods that has been eaten. I've hit a new problem by adding this to my game. This is because currently there is no limit to the player shrinking so that means at some point the square starts to inverse on its own shrinking so when it reaches 0 it starts to grow wildly out of control. I'm currently unsure of how to fix it with the way I currently have my code running. So I need to add a hard limit to how much the player can shrink and I wanted to add when it hits 0 it displays a death like screen but because the square doesn't hit 0 this doesn't happen as I would like it too.
16th Feb-
I've fixed the above problem as I completely forgetting the less than part of my code. So I resolved the above problem by having when Size<1 it does a "death screen".
I've also now added a level counter too so every time the ballList size <1 it not only regenerates all the balls it also makes the level counter go up by one so the player is clearing a level.
I've also added a bit of code here so that when the balls regenerate it creates a random amount of balls anywhere within the range of 20.
This way the player doesn't know how many balls they have to get in the next level and keeps the game at least a little bit more refreshing.
Today has definitely helped me understand boolean's more and I'll be sure to rely on them in future as they have helped me immensely with this current project.
I've now made two separate ways to play my game. I've created a 2 player functionality for my game and in a different file I've created a game where the player can nickname their square to be anything.
The class system is exactly the same from last time with the only difference being depending on who starves first it says "P1 Starves, P2 Wins!" or vice versa.
End of Feb - Beginning of March
Here we use multiple new variables, we need one to allow the player to type their name and we need another one to save whatever name they then type.
At the bottom of the above screenshot I've created a new n variable that cycles through the typing screen and the gameplay screen as if we don't separate these screens out the screen will be filled by square X's as the game would record the players movement which is what we don't want. The starting screen asks the player to name themselves in the game, how to move and a new mechanic I've added to this version which is sprinting, the player movement will go up dramatically but at the same time the rate of which they shrink at also goes up. And finally once the player hits the enter key to continue our value of N goes up so it goes to the next screen which is the game.


Comments