Page 1 of 1

Pong (Edited)

Posted: Tue Oct 04, 2011 11:04 pm
by treyrust
EDIT:
Alright, pretty much scratch that last post... I've made a few game-changing improvements that put the previous release to shame... So bye-bye old one.

For starters, the ball is round, I've fixed that pattern thing by simple changing the angle each time the ball has launched - this also raises the difficulty which is veeery nice. Before the velocity wouldn't increase on the ball, now it does. I've added a key for slow mo, I've added a toggle for making the ball a block or a ball and.... i think that's it, did I mention I made a center line?

Here is the list of keys that do stuff:
1) A toggles AI, it resets the level/velocity to one/zero and makes the keys..
2) W/S control the up/down for the second player.
3) Hold M for slow-mo
4) B to toggle block/round on the ball.
5) R to reset to ball... This is because the AI isn't perfect and will jam the ball into the ceiling on occasion... I will remove this if I ever decide to fix the AI.
6) UP/DOWN Controls the player
7) Space pauses


I think that's it for the commands... Here's a picture of the revised version:

Image

Again, I'll upload a video when I feel like it.

Here is the game: http://dl.dropbox.com/u/33322667/pong%200.1.zip

It ended up with 910 lines of code (including whitespace), although a bit of it is stuff that should either be rewritten cleaner, or shortened because I did a few things twice which is why the physics can be goofy at times...

As for general info... It was coded in C++ with SDL, in visual studio 2010 (I'm sold on the IDE btw, this project has won me over... I can't quite say why I love it so much, but it just feels so nice). Probably most importantly is it's my first game... I was messing around with SDL before and made something that resembled a game, but I was just trying to figure out the basics of SDL then... It was really bad. Also, I didn't follow any tutorials for this either, I looked up a couple of SDL references and the occasional C++ one, but for the most part it was all me! :mrgreen:

So, what do you think?

Oh, and if you play it... Do please tell what level you make it to! The most I've gotten is 5.

Re: Pong (Edited)

Posted: Wed Oct 05, 2011 10:19 pm
by ibly31
Haven't played it, but from the screenshots it makes the paddle and ball a little hard to distinguish from the background. That may not be the case when actually playing it, but other than that looks great!

The fact that you wrote most of it yourself is pretty awesome too! Keep up the good work man.

Re: Pong (Edited)

Posted: Wed Oct 05, 2011 10:41 pm
by k1net1k
Yeah just a simple red/blue border around the respective paddles would be awesome, and maybe white on the ball.
Other than that, pong is pong. i havent played your version.
I'm working on a secret pong project of my own :) Not showing till its done though.

Re: Pong (Edited)

Posted: Wed Oct 05, 2011 11:55 pm
by X Abstract X
You forgot to include all the .dlls for SDL, SDL_image and SDL_ttf. I played it for a couple minutes because no offence but, pong is pong. Good work for your first game :)