CSSE Learning Objectives

Project Completion Progress
Learning Objective What It Means How It’s Applied
Object-Oriented Programming Organizing code using classes and objects. Used for game characters and systems.
View Example Preview Code
Show Code
class Player {
 constructor(name){
   this.name = name;
 }

 move(){
   console.log("Moving");
 }
}
Writing Classes Creating reusable blueprints that define properties and behaviors for objects in the game. Player and Enemy classes.
View Example Preview Code
Show Code
class Enemy {
 constructor(type){
   this.type = type;
 }
}
Methods & Parameters Functions inside classes that allow objects to perform actions and accept inputs to change behavior dynamically. move(direction, speed)
View Example Preview Code
Show Code
move(direction, speed){
 this.x += speed;
}
Instantiation & Objects Creating real usable instances from classes so the game can generate active characters and elements. const player = new Player()
View Example Preview Code
Show Code
const player = new Player("Alex");
Inheritance (Basic) Allowing one class to inherit properties and methods from another class to reduce repeated code and build structured hierarchies. Enemy extends Character
View Example Preview Code
Show Code
class Enemy extends Character {}
Method Overriding Redefining a method in a child class to change or customize behavior inherited from a parent class. override update()
View Example Preview Code
Show Code
update(){
 console.log("custom update");
}
Constructor Chaining Using super() to call the parent class constructor so shared properties are properly initialized in child classes. super(data)
View Example Preview Code
Show Code
constructor(){
 super();
}
Control Structures Statements that control the flow of the program by making decisions or repeating actions based on conditions. if / loops
View Example Preview Code
Show Code
if (score > 10){
 win();
}
Iteration Repeating a block of code multiple times using loops to handle repeated actions efficiently. for / while
View Example Preview Code
Show Code
for(let i=0;i<10;i++){
 console.log(i);
}
Conditionals Decision-making statements that execute different code depending on whether a condition is true or false. if (health <= 0)
View Example Preview Code
Show Code
if (health <= 0){
 gameOver();
}
Nested Conditions Using multiple conditional statements inside one another to handle more complex decision-making logic. Advanced game logic
View Example Preview Code
Show Code
if (x > 10){
 if (y > 5){
   console.log("hit");
 }
}
Data Types Different kinds of values used in programming such as numbers, text, and true/false values that define how data behaves. numbers, strings, booleans
View Example Preview Code
Show Code
let score = 10;
let name = "Player";
let alive = true;
Numbers Numeric data used for calculations such as scoring, movement speed, health, and other measurable values in the game. score, speed, damage
View Example Preview Code
Show Code
let score = 100;
Strings Text-based data used for names, dialogue, labels, and any readable content displayed to the user. names, dialogue
View Example Preview Code
Show Code
let name = "Hero";
Booleans Values that represent true or false states, commonly used for game states like alive/dead or active/inactive. isAlive = true
View Example Preview Code
Show Code
let isAlive = true;
Arrays Ordered lists that store multiple values in a single variable, used for managing groups like enemies or items. enemies, items
View Example Preview Code
Show Code
let enemies = [];
Objects (JSON) Structured data made of key-value pairs used to represent complex entities like players, settings, or game states. game settings
View Example Preview Code
Show Code
let player = { name:"Alex", hp:100 };
Operators Symbols used to perform calculations or comparisons, such as addition, subtraction, and equality checks. calculations & comparisons
View Example Preview Code
Show Code
let total = a + b;
Mathematical Math operations used to calculate movement, distance, physics, and scoring mechanics in the game. movement, scoring
View Example Preview Code
Show Code
distance = Math.sqrt(x*x + y*y);
String Operations Combining and manipulating text values to create messages, scores, and dynamic UI text. "Score: " + points
View Example Preview Code
Show Code
let msg = "Score: " + score;
Boolean Expressions Logical conditions that combine multiple comparisons to make complex decisions in gameplay. decision making
View Example Preview Code
Show Code
if (score > 50 && alive){
 win();
}
Input/Output Handling data coming into the program (input) and displaying results back to the user (output). menus, controls
View Example Preview Code
Show Code
console.log("Hello");
Keyboard Input Detecting user key presses to control movement, actions, and interactions within the game. movement controls
View Example Preview Code
Show Code
document.addEventListener("keydown", e=>{
 console.log(e.key);
});
Canvas Rendering Using the HTML canvas to draw shapes, images, and animations that create the visual part of the game. game visuals
View Example Preview Code
Show Code
ctx.fillRect(10,10,50,50);
GameEnv Configuration Setting up and controlling global game settings like speed, difficulty, levels, and environment behavior. levels, settings
View Example Preview Code
Show Code
GameEnv.speed = 2;
Game Status: Not Started

Problems We Faced While Making the Game

While building our game, we ran into a few problems. Here are the main ones and what we learned:

• We got confused with classes and objects at first because there were a lot of files like Player, Npc, and enemies.

Inheritance was hard because we tried to make enemies act differently, but sometimes they still used the same code and acted wrong.

• We had problems with method overriding because changing the update() function sometimes broke movement or made things stop working.

Collision detection was an issue because the player was losing points too fast, so we added a cooldown (elonHitCooldown) to fix it.

If statements and logic were tricky because sometimes enemies would not follow the player correctly or would target the wrong thing.

• When using arrays and loops, we had issues where removed objects (like collected fish) were still causing bugs.

• Our score system didn’t always update correctly until we put it into a separate class called GameScorer.

• We also had small bugs with math and positioning like distance calculations, which caused enemies to move weirdly.

Overall, these problems helped us understand how all the CSSE concepts connect when making a real game.