Skip to content

A simple 2D bouncing ball game built using the MonoGame framework. Features paddle control, ball bouncing mechanics, collision detection, sound effects, and background music. Perfect for learning basic game development concepts in C#.

Notifications You must be signed in to change notification settings

jgohel9902/BouncingBallGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bouncing Ball Game 🎮

A simple 2D bouncing ball game built using the MonoGame framework. This game demonstrates basic game mechanics such as ball movement, collision detection, paddle control, and sound effects.


Features ✨

  • Ball Movement: The ball bounces off walls and the paddle, reversing direction when collisions occur.
  • Paddle Control: The player controls a paddle using the left and right arrow keys to prevent the ball from hitting the bottom.
  • Collision Detection: Detects when the ball hits the walls, paddle, or bottom boundary.
  • Sound Effects: Plays appropriate sounds for collisions and misses.
  • Background Music: Looped background music during gameplay.

How to Play 🎮

  1. Objective:

    • Keep the ball bouncing by hitting it with the paddle.
    • Avoid letting the ball fall past the paddle.
  2. Controls:

    • Left Arrow Key: Move the paddle left.
    • Right Arrow Key: Move the paddle right.
  3. Mechanics:

    • The ball bounces off the walls and paddle.
    • If the ball touches the bottom of the screen, it reverses direction and plays a "miss" sound.

Installation 🛠️

Prerequisites:

  • Install MonoGame Framework: MonoGame Downloads
  • Install a C# development environment such as Visual Studio.

Files and Structure 📂

Game1.cs: The main game loop and entry point for the game. Ball.cs: Handles the ball's movement, collision detection, and rendering. Bat.cs: Manages the paddle's movement and rendering. CollisionManager.cs: Detects and handles collisions between the ball and the paddle. Content/: Contains assets such as textures, sounds, and music.

Assets Used 🎵

Ball Texture: ball.png Bat Texture: bat.png Sound Effects: ding.wav: Plays when the ball bounces off walls or the paddle. applause1.wav: Plays when the ball touches the bottom boundary. Background Music: chimes.mp3

About

A simple 2D bouncing ball game built using the MonoGame framework. Features paddle control, ball bouncing mechanics, collision detection, sound effects, and background music. Perfect for learning basic game development concepts in C#.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages