Sign in to follow this  
infoseeker

Pong help

Recommended Posts

First of all I would like to apologise for asking what is probably the most asked and boring question on this forum. I would like to stress that I have searched through ALL the topics concerning Pong but did not find my answer, simply because my level is far too low for even the newbie posts. Anyway, my question is as follows: although I am very new to programming I have set my heart on creating Pong in C, however, my skill level is nowhere near high enough to do so. I was wondering whether any of you fine gentlemen could show me of a place where I may find working source code for Pong that compiles on MSVC++ (C code only please) and does not use Allegro or OpenGL or any other special things. The game is to be purely in MSCV++ compatible language. As I said, I honestly have searched a very long time for this but have finally decided to come out directly. All the code that I have found so far, whether here or google, has been for either a different compiler or using Allegro (-.-''). The reason I want to keep the language simple is I am very new to C and don't want to complicate my experience further. I am after source code because I have never done anything that moves (apart from a user controlled ascii character) and despite the hints other people have given in previous topics, I have no idea how to go about it. It is for this reason I believe source code would benefit me so I can see first hand what makes the program tick. I have been after this for a very long time and would immensely appreciate some help (preferably in the form of working source code ;). Once again I apologise for how boring this topic may seem to most people.

Share this post


Link to post
Share on other sites
I think if you need a source code first, you should select under which api you wan't to program the pong graphic ? Should it be DirectDraw , OpenGl , Direct3d , Winapi(GDI), the code in each case is different.

Share this post


Link to post
Share on other sites
I know this is not what you've been asking for, but I want to point out that libraries like Allegro are supposed to make things easier for you.

If you really have that little experience as you pointed out, you might be better off with the sources you already have. Allegro projects do compile with MSVC++ without problems. At least I appreciated the work Allegro did for me when I would've never understood what I had to do in order to get something simple like a pixel plotted to work.

Share this post


Link to post
Share on other sites
I agree with the people above me, and I must recommand that you do two things, in order:

1. put pong on hold for a little while. If you really are just that new to programming, you don't want to consider graphics yet, much less user interaction or animation! Learn your language. You mentioned C. C is a great language, go find websites about it. Learn all you can about it untill you really think you can do it. I learned Java to quickly and was frustrated for about 6 months where I did little to no coding. Don't do that!

2. Get something like Allegro or SDL. You said simple, but those are about as simple of graphics as you can possibly get. I haven't used Allegro, but I know SDL does everything for you and lets you do graphics, user-interaction, and animation with little to no trouble. Learn how to do some kind of simple demo with each of those first, then try pong.

3. Have fun!

Share this post


Link to post
Share on other sites
I have actually written a tutorial for how to make a very basic pong clone.But it is in swedish... And it uses SDL and c++ so maybe it isn't something for you...

But IMO, doing a graphical game in a console window is more difficult than using SDL.

If you want you can have the source.

//walle

Share this post


Link to post
Share on other sites
Quote:
Original post by jlgosse
Rob Loach, your SDL tutorials are great. I just read through them, they're a pretty good introduction!

Awww shucks, thanks. I'm working on a Tetris clone right now, but then after that I plan on doing more (user input, text, sprites, etc). Keep in touch.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this