View Full Version : pong
Loregoreth
09-06-2005, 05:04 PM
ok i'm new at this and this is my first game(and for some reason i cant post in the begginers section),anyways..........
ok i started making a pong game and got stuck at the paddles ball and AI.
ok so all i got done was the time ticker and the board. all i really want is if some body has got some time to teach and show me how to make them work.
thank you all
btw i'm useing c++ with direct draw 7
Einheri
09-06-2005, 05:50 PM
What exactly are you having problems with, and what language/tools are you using?
Loregoreth
09-06-2005, 06:07 PM
well i basiccally need a mentor, teacher person to show me how to make the paddles ball bimap then put in code and actually i could ask my brother to help me with the AI so bacially paddles and ball. All i know abbout the code is that it's c++ and i'm using Directdraw 7 sry i'm new at this
Einheri
09-07-2005, 03:04 AM
Ah, I have no experience in Direct Draw, myself, so I couldn't tell you the details, but I'm sure you could find a tutorial somewhere on how to load and display a bitmap. Once you have, it'll probably be pretty trivial to display and move the paddles (just update the position you draw them at after each time you press the key to move), and you'll only need very simple rectangle based collision (I'd write a simple rectangle class, if you can't use a pre-existing one; I have no idea if there is one in DirectX already or not), and only very easy vector work on the ball (basicaly, when the ball hits a side, make the y component of its velocity negative, and when it hits a paddle do the same to the x)...
... and that's probably all I can really tell you without getting into code (which is good; turning the ideas into code on your own is the more enjoyable way of doing things). Make sure you're comfortable in C++ before you attempt using the graphical side of things, though; your post makes you sound a little unsure.
Loregoreth
09-07-2005, 03:14 AM
thank you for your advice im lokking up tutorial already :).
JapigeMan
09-07-2005, 07:08 AM
thank you for your advice im lokking up tutorial already :).
20948
Bitmap loading in DDRAW is usually done by loading a bitmap into a GDI DC usign the standard Win32 function calls and then using the GDI BitBlt to copy it to a DDRAW surface DC.
roger_hq
09-14-2005, 03:07 PM
I wrote my first real game in DirectDraw7, and I think its a good place to start. There are tons of tutorials out there for developing games in DirectDraw, and the good part of it is that DirectDraw will never be obsolete because it is maintained as part of DirectX, even through new versions.
Here are a couple of decent links to get your DirectDraw game underway:
www.gamedev.net/reference/articles/article608.asp
http://www.programmingcentral.com/source/ddraw12.html
I found those by doing a google search for "DirectDraw tutorial". You can browse those to get you started but use the web to find loads more examples.
Good luck, let us know how your development efforts go!
rranft
10-07-2005, 01:30 PM
"Tricks of the Windows Game Programming Gurus" has a sample break-out game - you know, basically pong with the paddle at the bottom of the page and the ball us used to smash bricks out at the top of the page. Anyway, that sample contains all you would need to do what you are looking to do with your pong game except the second paddle controller setup. You could even make a "break-out/pong" game where you try to use the ball to break an obstacle between the players for extra points while still trying to cause the other player to miss the ball....
vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.