Skip to content

Dirakon/Bouncing-Ball-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bouncing-Ball-Game

Haddock

Project description

Gameplay demo

Game

This is a playable version with cannon, walls, and ball collision physics. There also is a trajectory of cannon shoot. The player can restart the level and switch the level to the next if they win. The number of balls in a game is limited. If a player reaches the end of created levels, they can create a new level and play it. Sounds and music accompany the gameplay!

Map editor

The process of level creation is simple because the game has a built-in map editor. The map editor allows the player to place a ball and remove it using the right and left mouse buttons correspondingly. Moreover, the map editor provides the player the ability to change the enemy ball radius using the mouse wheel. Player also can change background picture/music.

How to run the game

For installation, you will need Cabal tool, SDL 2, SDL_mixer 2

Alternatively, if you have a problem with installing either SDL or SDL_mixer, you could manually disable sounds:
    You will need to go to *.cabal file in the project, and set sound flag to False as default

Do the following:

git clone https://github.com/Dirakon/Bouncing-Ball-Game.git
cd Bouncing-Ball-Game
cabal build
cabal run

How to play

Game

Mouse to set ball trajectory.
Left-click to shoot.

Map editor

Mouse wheel to change size of the ball
Shift+mouse wheel to change durability of the ball
Right-click to place the ball
Left-click to remove the balls in the area
Right and left arrows to change the background image
Up and down arrows to change the background music

TODO

Feature Done
gravity
wall collisions
ball collisions
perfect ball collisions
rect collisions
different ball colors
ball destruction animations
score
dont restart music if its already playing

Authors

Dmitry Bannikov

Kirill Korolev

Stack

Music used

Toi encore (encore) by sparky (c) copyright 2022 Licensed under a Creative Commons Attribution Noncommercial license.
Tocharian C by septahelix (c) copyright 2014 Licensed under a Creative Commons Attribution (3.0) license.
The Vendetta by Stefan Kartenberg (c) copyright 2018 Licensed under a Creative Commons Attribution (3.0) license. Ft: Apoxode

Acknowledgements

The usage of SDL2_mixer is based on this example.
The usage of Gloss is based on this post.
The usage of C pre-processor is based on this thread.
Segment-circle intersection algorithm is based on this code example.

Releases

No releases published

Packages

No packages published