drop dead...
400 New versions of Pong flood the internet!
Sorry, just trying to amuse myself.
Pong didn't really have trigonometry, did it?
I'm making a version, and for spin I'm just using addition of x speeds...
dunno, but when i made one I used trig and velocities... then the collisions were realistic... of course assuming that the objects didnt dampen or that there wasnt friction involved... that would just make things more complicated... but yeah, to do proper rebounds getting the right angle you need trig, i think...
x = somewhere on the screen;
y = somewhere else;
deltaX = 1;
deltaY = 1;
loop forever {
x = x+deltaX;
y = y+deltaY;
if (hit top or bottom wall) {
deltaY = -deltaY;
}
if (hit left or right wall) {
deltaX = -deltaX;
}
draw ball at (x,y);
}
400 New versions of Pong flood the internet!
Sorry, just trying to amuse myself.
so, when are you releasing your amazing 3D high-tech game for the GP2X? or are you just taking the piss because your too inept to make your own version of pong?
And theres more to pong than you think, you have to get the trignometry right for the angles, and changing in velocities due to the user moving quickly to intercept it etc... it's pretty easy, but its more than an hours work if you want it right and decent...
Actually no, you don't
The basic "pong" bouncing code does not involve any concept of "angle". You just do something like this:
And that's all. No angles, no sin/cos functions, no trigonometry.
Don't forget the numerous versions of sokoban and boulderdash
Well those are what I'm planning on starting with!
Actually I quite like the idea of a 6-in-1 pong type game, I think Ill add that to my list lol
400 New versions of Pong flood the internet!
Sorry, just trying to amuse myself.
I do have neat sinewave bounce and alternating background colour fading from black to white and rainbow colours red orange yellow green blue violet and back in between.... brings me back to the days of copperbar programming and try my smooth scrolling routines on the c64!
Where are these... things... coming from? :huh:Pong stinks