Ping
Language: | C++ |
---|---|
Software: | CLion, GitKraken, GitHub |
Code Repository: | GitHub |
Artwork: | Kenney |
Download Location: | zoerowbotham.itch.io |
Ping was the first piece of coursework for my first year of university. The specification was to make a simple Pong clone where a ball can be bounced off paddles and points could be won by the ball travelling off the side.
I went beyond the spec by including a one-player mode in which an AI is used to control the second paddle. The AI is not perfect however, sometimes the ball will move too fast for the paddle and the AI will miss.
I improved my knowledge of collisions for this game and used axis aligned bounding boxes for the paddles and a circle shape for the ball, in order to achieve more accurate collisions.
Below is a video of the AI (the right paddle) at work. This is done by an invisible second ball travelling at a faster speed so the AI can try and position itself correctly. In the video the game is in hard mode, with the blue obstacles randomly moving up and down. These blocks obstruct the ball making it harder to predict gameplay.