CSE 102 | L1-T1 Project

WaveSim: Interactive Wave Simulation with Curvy PONG Game

Course
CSE 102
Framework
iGraphics (OpenGL)
Type
Graphics & Game

Video Demonstration

Watch the project in action - Interactive wave simulation with curvy PONG game

Problem Statement

This project was an offline assignment for the CSE 102 | Structured Programming Language Sessional course. We were provided with a reference .exe file containing all compulsory features that we needed to replicate in our implementation.

The project was open for additional features, allowing us to build extra functionality for bonus marks. I developed a PONG game that follows curvy motion rather than normal linear motion as my extra feature.

Core Features

Wave Management

  • •Create 'n' number of base curves (PageUp to add, PageDown to remove)
  • •Combine curves to form a summation curve
  • •Adjust phase with right/left arrow keys (30° increments)

Real-time Controls

  • •a/A: Decrease/Increase amplitude
  • •f/F: Decrease/Increase frequency
  • •q: Backscreen
  • •x: Quit application

Ball Physics

  • •Balls move along curves with realistic physics
  • •Balls bounce off walls and change direction
  • •Adjustable ball speed (+/- keys)
  • •Pause/Resume ball movement (p/r keys)

Display Controls

  • •0: Hide/Show summation curve ball
  • •1,2,3,4,5...: Hide/Show specific ball
  • •Toggle curves on/off to show only balls
  • •Interactive menu system

Extra Features

PONG Game Mode

Classic PONG game with curvy ball motion instead of linear movement

Scoring System

Track scores for competitive gameplay

Multiplayer Support

Two-player mode with separate controls (W/S for Player 1, UP/DOWN for Player 2)

Technology Stack

iGraphics Framework

Based on OpenGL

About iGraphics: A thin wrapper on top of OpenGL designed for simple 2D graphics demonstrations and C programming course projects. Provides APIs for animation, shape drawing, text output, and I/O event handling.

My Solution

I successfully implemented all the core features required for the assignment, ensuring full compatibility with the reference implementation. Additionally, I developed an innovative "Game Mode" that transforms the wave simulation into an interactive PONG game experience.

Key Innovation: Curvy PONG

Unlike traditional PONG games where the ball moves in straight lines, my implementation features a ball that follows the mathematical curves defined by the wave simulation. This creates a unique gameplay experience where the ball's trajectory is determined by the combined wave functions, making the game more challenging and visually interesting.