MIDTERM PROJECT PROGRESS

UNI RUSH 

INSPIRATION:

The inspiration behind the game I want to create comes from how overprotective I tend to be with my GPA. Since I was a kid, I always would work to achieve the highest grades and an even the slightest deduction of grades would make me cry. However, after I came to university, that reality changed, and it’s been like a roller-coaster with all its ups and downs. The games resemble a university student who is running all over to catch the grades they want. Based on that, the gpa gets either incremented or decremented depending on the letter grade they catches.  I have always been keen to understand how gpa calculation works, so I searched it up and decided to base my game on that. Also, gpa calculator still always saves my life. Finally, uni rush is a game logic in which a student character is moving different grades comes along the path. So, when the student catches the appearing grade, then GPA is getting calculated at the back end based on the overall grades taken.

GAME RULES:


To score a higher GPA score, the character must catch the better grades and skip the bad ones. The winner of the game will get a maximum GPA score of four. For the movement, the user must move the character in the right path either up or down, right, or left.

IMPLEMENTATION STRATEGY:


I will be using object-oriented approach to divide the coding patterns based on the game logic. Then, I will use an array data structure to store the grade letters in form of images. Afterwards, I will implement 3 different sound effects for each game screen. Eventually, I will have a win sound effect if GPA score was 4.0.

OBJECTS TO BE USED IN GAME:


Grade letters

The grade letter objects will be images of each grade letter on its own

Student Character

This can be any cartoon character with a bigger size as compared to grade letters and can move either left-right or up and down based on the key pressing

Game Background

This object will be a university campus image which is set as the background of the game

GPA Score Prompt

This object will be a simple text prompt and the value of the GPA score will be calculated at run time depending on the game logic.

STORY BOARD OF THE GAME


The game starts with a menu screen on which a prompt will display that shows which key to press to start the game and other instructions. On the main menu screen there is a button to move to the game rules screen. The game rule screen shows all keys for the movement of character for example up, down, left, and right. The start game button on the main menu screen will move to the game screen which is the main part of the game. Furthermore, on the top there will be a GPA score prompt. The character on the other hand will be either standing on one side, and the grades are coming towards him from the other side, or the character is moving while grades are appearing suddenly on a random basis. Background sound effects will be played on every screen.

PROGRESS :

 

CODE FOR NOW :

// import library for sound 
import processing.sound.*;
// objects for bakcground, charcter,  alphabets, and gpa calculation
PImage background;
PImage character;
PImage A;
PImage B;
PImage C;
PImage D;
PImage F;
int score; 

// Position of the character in x and y coordinates 
int posx=0;
int posy=300;

//  background sound object 
SoundFile backmusic;

// Set up function 
void setup() 
{
  // setting screen size
  size(1080, 720);
  // every 30 milescond, a new screen is rendering 
  frameRate(30);
  // initialzie background image object and setting background image as parameter
  background = loadImage("back.png");
  // initializing charcter image object 
  character = loadImage("character.png");
  // initializing letter grade objects 
  A= loadImage("A.png");
  B= loadImage("B.png");
  C= loadImage("C.png");
  D= loadImage("D.png");
  F= loadImage("F.png");
  // initiliaze sound object 
  backmusic = new SoundFile(this, "BackSound.mp3");
}

void keyPressed() 
{
  // if key is pressend by w , then move charcter up
  if(key == 'w') 
  {
    image(character,0,posy-1);
  }
  // if press a, charcter move to left side 
  if(key == 'a') 
  {
    image(character,posx-1,0);
  }
  // if charcter press s, charcter move down 
  if(key == 's') 
  {
    image(character,posx,posy);
  }
  // if press d, character, move right 
  if(key == 'd') 
  {
    image(character,posx+1,posy);
  }
  
}


void draw() 
{ 
  // playing the sound
  backmusic.play();
  // dispalying  background image 
  image (background,0,0);
  // displaying chacrter image and give its initial positions (x,y)
  image(character,posx,posy);
  // displaying letter grades,  plus I give each letter grade their position (x,y)
  image(A,width-120,300);
  image(B,width-150,500);
  image(C,width-180,200);
  image(D,width-220,600);
  image(F,width-140,150);
  // displaying gpa score at the top 
  text("GPA Score: ",30,30);

 

One thought on “MIDTERM PROJECT PROGRESS”

  1. Hi Shamma, was hoping to see a little more progress, but it’s a good idea for a game. You can use circle intersection (even though your images aren’t all exactly circles) to figure out when your player intersects with a grade. You can fine tune it to feel close enough to true intersection. Get the distance between the player object and the other objects (use the dist function) and see if the distance is less than the two radii of the two objects (pretending their circles) added together. If so, then that is an intersection.

Leave a Reply