Pong (Edited)

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Post Reply
User avatar
treyrust
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 36
Joined: Thu Jul 21, 2011 4:32 pm
Current Project: Between projects
Favorite Gaming Platforms: PS1/2/3/P, NES, Wii, Genesis, Dreamcast, GBA, DS
Programming Language of Choice: C++

Pong (Edited)

Post 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.
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: Pong (Edited)

Post 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.
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Pong (Edited)

Post 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.
X Abstract X
Chaos Rift Regular
Chaos Rift Regular
Posts: 173
Joined: Thu Feb 11, 2010 9:46 pm

Re: Pong (Edited)

Post 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 :)
Post Reply