https://github.com/jgohel9902/bouncingballgame
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#.
https://github.com/jgohel9902/bouncingballgame
csharp monogame-framework
Last synced: about 1 month ago
JSON representation
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#.
- Host: GitHub
- URL: https://github.com/jgohel9902/bouncingballgame
- Owner: jgohel9902
- Created: 2024-11-25T15:12:34.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-01T02:56:18.000Z (5 months ago)
- Last Synced: 2025-02-06T04:53:50.871Z (3 months ago)
- Topics: csharp, monogame-framework
- Language: C#
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://www.monogame.net/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