A 2D reflex-based game where you control a catcher bowl to grab falling diamonds before they hit the ground. Built using Python and OpenGL, and rendered completely with the Midpoint Line Drawing Algorithm and GL_POINTS.
Assignment 02 โ 2D Game Implementation
Course: CSE423 (Computer Graphics, 0.75 credit)
Lab Instructor: Farhan Feroz [FHZ] & Arian Nuhan [CARN]
Semester: Spring 2025
You play as a catcher bowl at the bottom of the screen. Colored diamonds fall from the top, and your job is to catch them. If a diamond falls and hits the ground, it's game over. As time progresses, the diamonds fall faster, increasing the challenge!
- ๐ฃ Diamonds rendered using 8-way Midpoint Line Drawing
- ๐ฏ Catcher bowl made with 4 midpoint lines (trapezoid shape)
- ๐ฑ๏ธ Mouse-controlled UI with:
- Restart Button (โฉ๏ธ)
- Play/Pause Button (
โถ๏ธ /โธ๏ธ) - Quit Button (โ)
- ๐จ Bright, randomly colored diamonds
- ๐น๏ธ Responsive horizontal movement using arrow keys
- โฑ๏ธ Speed increases over time using delta time
- ๐ AABB-based collision detection
| Input | Action |
|---|---|
| โฌ ๏ธ / โก๏ธ | Move catcher left/right |
| Mouse Click | Interact with buttons (โฉ๏ธ โธ๏ธ โ) |
| Restart Btn | Starts a new game |
| Play/Pause Btn | Toggles falling/paused state |
| Quit Btn | Ends the game |
- Implemented Midpoint Line Drawing Algorithm for all shapes.
- Used zone conversion to support drawing lines in all 8 directions using a single method.
- Applied Axis-Aligned Bounding Box (AABB) collision detection.
- Used delta timing to ensure consistent motion across different frame rates.
- Python 3.x
- PyOpenGL
- PyOpenGL_accelerate
- ๐ข Assignment 01: 2D Transformations & Clipping
- ๐ Assignment 02: Catch the Diamonds! (this project)
- ๐ฎ Assignment 03: Bullet Frenzy 3D
Monowar Husain
๐ง monowar@monowar.me
๐ง monowarhusainomi@gmail.com
๐ monowar.me