View Single Post
Old 11-11-2008, 02:14 PM   #37
Claxon
Senior Member

Activity Longevity
0/20 18/20
Today Posts
0/11 ssssss345
Location: London
Default

Quote:
Originally Posted by Duckman View Post
So I currently have a struct for the ball that has x position, y position, xspeed, yspeed, and image variables. I will be updating that and creating an update function that will feed the paint function the current parameters of that balls position. Do I have the general idea down? Sorry for the annoyances, this is my first game and I just want to make sure I am on the right path.
Yes that's right. I tend to keep my game loop fairly simple, it will call two functions, the first called Process() (or Update()) that handles the movement / AI / Game States etc, and another function called Paint() that deals exclusively with drawing the game (you don't want to do processing update within your draw loop). In this system the Draw function would simple get the position of the paddles and the ball, and draw them at that location. The process loop would update the position and speed values, and check for collision.


Quote:
Originally Posted by TG1 View Post
My question is, if anyone here knows Dark GDK, is this considered good time for this framework? (Again, I really really really don't know ).
Having never used Dark GDK I can't really say, but a pong clone shouldn't take you long at all (an experienced game programmer could make it in under an hour). If you're experimenting with things though and learning the system, then the time doesn't matter, providing you learn from it (in this case it would only improve your performance at future DarkGDK projects).

Quote:
Originally Posted by TG1 View Post
Another question - I'm having trouble with the 2nd puddle's AI, if I let it go towards the ball it always catches it, if I try to add some sort of penalty it never catches it, any advice?
Give the AI a maximum paddle speed. and only have it move when the ball has passed a certain point (eg. past the centre of the play area). You may also want to increase the ball speed each time the player or AI hit it. That way you can make the ai quite accurate at first, but as the ball speeds up and has more lateral velocity (forcing the AI move more), the AI will struggle to keep up. This gives the player a good challenge, and allows you to tweak the difficulty level easily too. Other behaviors for the AI could be to always follow the balls position, or to move back to the centre when the ball is traveling away from it.

Quote:
Originally Posted by TG1 View Post
Oh, and once I make it all pretty and nice (as nice as a programmer with no art capabilities can make it), will this be a good portfolio starter peice?
More than likely 'no'. If you make it into something like what my version is intended to be like (3d/cool graphics, particle systems, power-ups, perhaps multi-player, unique game mechanics) then yes it could go on your portfolio, but if it's a straight pong clone, it's not even worth mentioning (like I said above, anyone reading your portfolio could probably get the same result in an hours work).
Claxon is offline