SFML community forums

General => SFML projects => Topic started by: Godsend72 on January 13, 2016, 04:57:33 pm

Title: Pong
Post by: Godsend72 on January 13, 2016, 04:57:33 pm
This is my try on a pong.

It was finished a while ago.

I started small and simple but things got pretty ugly pretty fast.
I had a few months break from programing because of some obligations... and to get back into shape I decided to make a pong clone, I got carried away and before I knew the source got big and I didn't want to break it into separate files. :/

Video: https://youtu.be/MtfxawsoY2g
Source: https://github.com/Godsend72/GitFolder

(http://i67.tinypic.com/lwl7n.png)

(http://i66.tinypic.com/2jflq1d.png)

(http://i65.tinypic.com/nppglv.png)

My AI code looks like this:
I have a prediction ball that travels 1.3 times faster than the real ball.
AI paddle moves only when the ball is on his side of the screen.
When the ball collides with the player paddle I set it to the same position as the real ball.

AI prediction example: https://youtu.be/oRq4iqfq33Y

AI logic:
(click to show/hide)
Title: Re: Pong
Post by: Carlos Augusto Br Cpp on September 15, 2016, 06:16:36 am
wow really good...I'm thinking in make a pong game too
.
Title: Re: Pong
Post by: MrOnlineCoder on September 15, 2016, 01:14:04 pm
GitHub link is broken. Nice work anyway!
Title: Re: Pong
Post by: Godsend72 on September 15, 2016, 03:22:09 pm
GitHub link is broken. Nice work anyway!

It is available again, I made it private because it was a mess :D

EDIT: It is still a mess.