Midterm Progress Report

Concept/Ideation

I started off by thinking about what is the vibe I wanted to have in my project. I browsed through Pinterest boards to see if I could find some inspiration. This is where I came across this cute photo:

This may contain: the sky is filled with stars and clouds

I wanted my game’s background photo to have a similar color palette and aesthetic. It also reminded me of the nostalgic feeling I had as a kid when playing simple, food-themed games — like cooking games where you’d make ramen or decorate baked goods. Inspired by that, I decided to create a game with a similar concept but scaled down to fit within my scope. I knew from the start that I wanted it to be candy-themed.

Brainstorming

I quickly drew up the ideas that I had for the design and started to sketch the initial visuals:
I then used Figma to actually create the background of the game in addition to the necessary visual assets:

I idea is that the game involves three boxes, each corresponding to a color of candy falling from the sky. To catch the candy, you move the box of the matching color to the spot where the candy is about to fall. To switch between the boxes, simply press the spacebar. While there is no traditional winning system, you score one point for each candy you catch. And there will never be more than one candy falling at the same vertical level at a time.

Code Progress/Concerns

Right now, I’m focused on having two classes: one for the box and one for the candy. These will be central to the gameplay mechanics, as the candy will fall and the player will control the box to catch it. The most uncertain part of my midterm project is ensuring smooth interaction between the boxes and candies, especially when switching between boxes using the spacebar. This could lead to timing issues or bugs that affect the gameplay experience. To minimize this risk, I plan to write some code to test the collision detection and box-switching functionality. Currently I’ve preloaded by assets:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function preload() {
bg = loadImage("bg.png");
startButton = loadImage("start.png");
mouseSound = loadSound("mouse.mp3");
boxImages[0] = loadImage("box1.png");
boxImages[1] = loadImage("box2.png");
boxImages[2] = loadImage("box3.png");
candyImages[0] = loadImage("candy1.png");
candyImages[1] = loadImage("candy2.png");
candyImages[2] = loadImage("candy3.png");
}
function preload() { bg = loadImage("bg.png"); startButton = loadImage("start.png"); mouseSound = loadSound("mouse.mp3"); boxImages[0] = loadImage("box1.png"); boxImages[1] = loadImage("box2.png"); boxImages[2] = loadImage("box3.png"); candyImages[0] = loadImage("candy1.png"); candyImages[1] = loadImage("candy2.png"); candyImages[2] = loadImage("candy3.png"); }
function preload() {
  bg = loadImage("bg.png");
  startButton = loadImage("start.png");
  mouseSound = loadSound("mouse.mp3");

  boxImages[0] = loadImage("box1.png");
  boxImages[1] = loadImage("box2.png");
  boxImages[2] = loadImage("box3.png");

  candyImages[0] = loadImage("candy1.png");
  candyImages[1] = loadImage("candy2.png");
  candyImages[2] = loadImage("candy3.png");
}

in addition to structuring my two main classes for OOP:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
class Box {
constructor(x, y, width, img) {
this.x = x;
this.y = y;
this.width = width;
this.img = img;
}
move(dx) {
this.x = constrain(this.x + dx, 0, width - this.width);
}
display(isActive) {
image(this.img, this.x, this.y, this.width, 60);
if (isActive) {
stroke(255, 0, 0);
strokeWeight(2);
noFill();
rect(this.x, this.y, this.width, 60);
}
}
}
class Candy {
constructor(x, y, img, type) {
this.x = x;
this.y = y;
this.size = 40;
this.img = img;
this.type = type;
}
fall() {
this.y += gravity;
}
display() {
image(this.img, this.x, this.y, this.size, this.size);
}
}
class Box { constructor(x, y, width, img) { this.x = x; this.y = y; this.width = width; this.img = img; } move(dx) { this.x = constrain(this.x + dx, 0, width - this.width); } display(isActive) { image(this.img, this.x, this.y, this.width, 60); if (isActive) { stroke(255, 0, 0); strokeWeight(2); noFill(); rect(this.x, this.y, this.width, 60); } } } class Candy { constructor(x, y, img, type) { this.x = x; this.y = y; this.size = 40; this.img = img; this.type = type; } fall() { this.y += gravity; } display() { image(this.img, this.x, this.y, this.size, this.size); } }
class Box {
  constructor(x, y, width, img) {
    this.x = x;
    this.y = y;
    this.width = width;
    this.img = img;
  }

  move(dx) {
    this.x = constrain(this.x + dx, 0, width - this.width);
  }

  display(isActive) {
    image(this.img, this.x, this.y, this.width, 60);
    if (isActive) {
      stroke(255, 0, 0);
      strokeWeight(2);
      noFill();
      rect(this.x, this.y, this.width, 60);
    }
  }
}

class Candy {
  constructor(x, y, img, type) {
    this.x = x;
    this.y = y;
    this.size = 40;
    this.img = img;
    this.type = type;
  }

  fall() {
    this.y += gravity;
  }

  display() {
    image(this.img, this.x, this.y, this.size, this.size);
  }
}

 

Leave a Reply