Page 1 of 1

So four years later...

Posted: July 4th, 2017, 12:53 am
by albinopapa
I have tried making larger projects and have failed to finish a single one of them. This isn't "finished", but at least it's playable with a start, middle and end. Don't get excited, it's just a simple pong game. After watching all the great things on this forum popup over the last few months, I'm really embarassed to be posting this here, but hey what the hell.

I really plan on adding more to this, but for now this is the state of things.

Single player: W/S keys for UP/DOWN, AI is pretty naive, just follows the ball.
Two player: W/S for player 1 and Up/Down arrows for player 2.

Text is from Direct2D/DirectWrite.
It uses the Chili 3D fundamentals framework, but doesn't make use of it. Hoping to change that really.

Part of me wants to be ambitious with this and see what turns out, the part of me that has been coding for four years with nothing to show, but knowledge feels that this is the best I'll be doing for now. We'll see. I plan on uploading to GitHub instead of uploading here, if I keep adding on to it.

If you have any questions on what is going on in the code, just ask. It does kind of bounce around as design decisions about code isn't my strong suit, which is why I never finish projects. This project should have taken a few hours, but have been working on it for a few hours a day for two weeks. There were a few refactorings trying to find a way to do what I wanted.

EDIT: Deleted the zip file and posted the GitHib link.
GitHub repo Pong

Re: So four years later...

Posted: July 4th, 2017, 11:52 am
by Yumtard
Good job!


Completing projects is hard sometimes but very satisfying.

One thing about tha AI which I'm sure you're already aware of. It's unbeatable.
I did the same thing at first when I did a pong game

Re: So four years later...

Posted: July 4th, 2017, 5:19 pm
by albinopapa
Yes, I'm thinking of ways to change it. Thanks for checking it out.

Re: So four years later...

Posted: July 4th, 2017, 10:03 pm
by Pindrought
Thanks for sharing.

I had some interesting results.

https://i.gyazo.com/7bfa3ac763996ecb613 ... 7e9c90.mp4

Re: So four years later...

Posted: July 5th, 2017, 3:27 am
by albinopapa
Yeah, I'm going to have to check for instances where ball might go along the X or Y axis.

Re: So four years later...

Posted: July 6th, 2017, 9:15 pm
by albinopapa
Update: July 6, 2017

Better AI ( doesn't just follow the ball ). Position is calculated once the ball hits a wall and is reflected to AI's side. When the ball is too fast or is redirected because of obstacles before AI responds, it will get scored on.

Bumped up the max speed of the ball and how fast it ramps up each paddle hit.

More obstacles, randomly generated position and orientation.

Features that have been suggested:
Reflections that change the angle the ball leaves the paddle, think original arkanoid.
Power ups: Slow ball, Fast ball, pinball paddles, multi-ball.
3D version, the nice thing about this suggestion is the fact I built this in the 3D fundamentals framework, so it might happen.

I uploaded to GitHub: Pong

Re: So four years later...

Posted: July 8th, 2017, 1:29 pm
by chili
This is a step in the right direction man, glad to see this thread. Nothing to be embarrassed about at all. Rather than chasing a bunch of projects that go nowhere, starting humble and taking something to 105% completion is way better IMO.

Also nice to see some stuff being made with the 3D Fundamentals code :)

Re: So four years later...

Posted: July 8th, 2017, 3:01 pm
by albinopapa
Thanks chili.

Re: So four years later...

Posted: July 14th, 2017, 2:50 pm
by Zedtho
I honestly think you should upload more of your games. You seem to have made a lot of them but just not uploaded them to the forum. While I often do it because I make a shit-ton of errors, it's also because of the support from others, which really motivates me to continue on.

Also, this pong game is really good! I'm baffled by the code because I've never heard of a state before (or of almost anything in there). The game is very complete and I think it's a good step forward!

Re: So four years later...

Posted: July 14th, 2017, 11:30 pm
by albinopapa
A few of the things in the GitHub account are forked from others projects, like Simon-Says for instance, which is from your repo. Some are shared projects with others that will never be finished for one reason or another. Some is just tech demo type stuff.