Advertisement

Ping Pong

Started by August 03, 2002 05:12 PM
5 comments, last by phatslug 22 years, 6 months ago
So my next game im gonna work is a Ping Pong game, cause I love playing it, and i dont think theres a single computer Ping Pong game... ever. Well, obviously physics are gonna be a BIG part of this project. I think i got the basic idea trajectory what with the angle of the paddle, ball speed and such, but now... Spin. What happens when you slice the ball, or give it topspin. A friend suggested i look into something i vaguely remember hearing about related to meteorology called the "Coreolis Effect" (bah.. spellling) It seems like it could help from what I remember, but does anyone else know of any other methods I could use to accurately model spin, and/or point me to any good sources you know about. Thanks alot.
"Physics for Game Programmers" has a chapter on pneumatics - basically the viscosity of the air causes odd things to happen.

Accurately simulating ping-pong could actually be rather difficult.
Advertisement
I''m curious how you plan to simulate spin, seeing as it''s accomplished by a quick flick of the wrist. Short of a custom controller, I don''t see how you can create a usable interface.

_________________________________________________________________________________
The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.
-Six String Samurai
_________________________________________________________________________________The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.-Six String Samurai
As for the interface: extra keys

If you want to do the flick, you got to press a special key at the right time. If you get the timing wrong, the ball will just bounce off the table

And as for spin: Hmmmz... if I recall correctly, that causes the ball to have a curve trajectory through "space"... My idea is to multiplay the spin by a *magic number*, and then each update, change the balls trajectory by the new number...

At least, in a golf game that would give the spin you want ^_^ Or rather, for a golf game you would also calculate a second Magic Number, and not apply the sping until that distance is reached... :S
How about you use mouse input?

quick move up makes the ball spin back
quick move down makes the ball spin forward
same for right/left

easy
quote:
Original post by PouyaCat
And as for spin: Hmmmz... if I recall correctly, that causes the ball to have a curve trajectory through "space"...


Do we insert the finger quote movements around the word "space" or was it assumed that you were doing it for us?

Will there be any "lasers" in this pong game? haha. Just kidding man. I think that adding some advanced stuff like that to a pong game would be kind of cool. It could make for some very interesting boards where in order to complete them, you have to put spin on the ball to get it around certain obstacles. Just make sure that you make the ball big enough to see it rotating and make it easy to see which way the ball is rotating. Otherwise, it will be difficult to play.


Looking for an honest video game publisher? Visit www.gamethoughts.com
Shameless plug: Game Thoughts
Advertisement
ROFL

(btw, me == PouyaCat)

Actually "space" means... erm... the space where the game is played... ^_^

I think you can safely replace "space" with simply air, but when it comes down to mathematically modelling stuff, I tend to talk about "space". Everything takes place in a "space" ^_^



-Maarten Leeuwrik, www.sherman3d.com
Increasing my sig to shamelessly plug the Prototype we are working on (please provide feedback at maarten@sherman3d.com ^_^ ): Karawachi Prototype

This topic is closed to new replies.

Advertisement