Department of Computer Science and Engineering, University of Dhaka
Structured Programming Lab
Individual Contribution Reflection
Answer from your own work on the project your team will be submitting. Refer to your actual C code by file name and function
name. You will be questioned on this on Sunday, against the submitted code, so keep them specific and truthful. Keep your
answers concise.
Name: Abu Darda
Class Roll: SH-46
Project title: ‘Spaceshooter” : Galaxy attack
1. Your contribution map
List the most significant 4 functions or modules you personally wrote. Fill one row per function.
Limit: up to 4 rows. Others' code does not count.
Function / module you wrote
File name
Line range
What it does (one line)
Initializing Pool
Enemy.cpp
10-15
It runs a simple loop from 0 to 199
and sets every single bullet's isActive
flag to 0. This guarantees that when
the game starts, no phantom bullets
are accidentally rendering or moving
around your game screen.
Line Range & Structure
Breakdown
Enemy.cpp
103-119
Active bullets move downward
smoothly using deltaTime, ensuring
they travel at the exact same speed
regardless of the game's framerate.
As soon as a bullet travels past the
bottom boundary (screenHeight), its
state flips to false so the slot can
immediately be reused for a new
shot.
The Vector and Limits
Leaderboard.cpp
3-4
Pulls in the standard dynamic array
container (std::vector) and sets a
hard limit of 5 entries for your top
scores.
Reset game
Main.cpp
112-113
Resets the entire game to it’s initial
state so that a new game can be
started
2. One problem you solved
Pick one bug or obstacle you personally fixed in your code. State
(a) The continuous, high-pitched pew-pew sound effect of the player's weapon becoming deeply annoying after 30 seconds.
(b) Creating fast, ramming enemies that give the player zero reaction time to dodge.
(c) Constantly destroying and instantiating bullets and explosions causes the game to stutter every few seconds
3. One design choice you made
Name one decision in your C code (for example: fixed array vs. dynamic allocation, global vs. parameter passing, iterative vs.
recursive, or how you read and validated input). State the alternative you rejected and why.
* "Dumb" But Effective Shooters
Instead of an AI aiming at the player, enemies fire using simple fixed intervals or basic vector math.
Fixed: Fire straight down every 2 seconds.
Targeted (Basic Math): Calculate the angle between the enemy and the player only at the moment of firing, and assign that
static trajectory to the bullet. Once the bullet is moving, it doesn't track the player.
4. One thing you would improve
In some points,it could’ve been done better by if we had looked into buffer the Player's Input,Simplifying Collision
Matrices,Implementing Object Pooling..We could’ve done these steps:
1· Memory Stability: By avoiding dynamic allocation functions entirely during gameplay loops, you experience absolute zero
frame drop or stutter.
2. Deterministic Speed: Bitmasks process at hardware-level efficiency, keeping your collision loops tight.
3· Professional Responsiveness: The input buffer bridges the gap between human error and strict game logic timing,
removing clunkiness completely.
5. Redesign the evaluation
As a beginner,it is quiet impossible to go the first two semesters without AI,especially for who had never coded
before.As long as the evaluation goes on,I will never try to use AI tools ever.