Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Pong  (Read 3715 times)

0 Members and 1 Guest are viewing this topic.

Godsend72

  • Newbie
  • *
  • Posts: 20
    • View Profile
Pong
« 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







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)

Carlos Augusto Br Cpp

  • Newbie
  • *
  • Posts: 40
  • Programming is life
    • View Profile
    • Email
Re: Pong
« Reply #1 on: September 15, 2016, 06:16:36 am »
wow really good...I'm thinking in make a pong game too
.

MrOnlineCoder

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: Pong
« Reply #2 on: September 15, 2016, 01:14:04 pm »
GitHub link is broken. Nice work anyway!

Godsend72

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Pong
« Reply #3 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.