What a half hour can do for you
by Matthew Harris · in Torque Game Builder · 11/08/2006 (8:00 am) · 11 replies
I was bored and couldn't get to sleep last night. Too much coffee so I wipped up something up in TGB that only took me a half an hour. I hope you don't mind GG on the borrowed graphics!

Of course this is multiplayer pong. The key was doing a lot of this in the editor and make TGB work for me. Of course scripting was required. Not bad for a half hours work at 4:30 in the morning.

Of course this is multiplayer pong. The key was doing a lot of this in the editor and make TGB work for me. Of course scripting was required. Not bad for a half hours work at 4:30 in the morning.
#3
11/10/2006 (7:11 am)
Good hussle, Matt ;D
#5
11/14/2006 (2:28 pm)
Nice work. ;)
#6
This tutorial caught my eye because I've tried to make a pong game before. This tutorial notes the problem I had; offers a solution; yet the problem is much more noticeable with this version than the version I tried to build.
Whenever the ball hits my paddle the paddle nudges as if it's being pushed. Actually, that was my old problem. This tutorial quietly offers a solution (onCollision... setPositionX...). In this build my paddle gets stuck to the ball when it collides (the ball goes inside the paddle) and continues to follow the ball as it bounces around the screen.
...
I'm using windows.
...
Anyone having the same problem?
Edit: I changed the collision mode for the ball back from "circle" to "polygon" (as the tutorial stated) and now I just get the pushing/nudging movement and the paddle no longer gets stuck. Anyone else having a problem with these jolting movements when the ball hits the paddle? I'm not sure why the circular collision detection mode would create a crazier collision response.
Double Edit: The only reason why it appears as a "nudge" is because it the ball and paddle have a world limit. What's actually happening is the ball hits the paddle, moves it back, then the ball hits the world limit(happens quickly, wasn't noting that), and the paddle moves back into place once the ball leaves. If I turn off world limits for the paddle the same sequence of events happens except the paddle does not move back into place.
11/17/2006 (12:08 pm)
I can't get it working properly. *sad*This tutorial caught my eye because I've tried to make a pong game before. This tutorial notes the problem I had; offers a solution; yet the problem is much more noticeable with this version than the version I tried to build.
Whenever the ball hits my paddle the paddle nudges as if it's being pushed. Actually, that was my old problem. This tutorial quietly offers a solution (onCollision... setPositionX...). In this build my paddle gets stuck to the ball when it collides (the ball goes inside the paddle) and continues to follow the ball as it bounces around the screen.
...
I'm using windows.
...
Anyone having the same problem?
Edit: I changed the collision mode for the ball back from "circle" to "polygon" (as the tutorial stated) and now I just get the pushing/nudging movement and the paddle no longer gets stuck. Anyone else having a problem with these jolting movements when the ball hits the paddle? I'm not sure why the circular collision detection mode would create a crazier collision response.
Double Edit: The only reason why it appears as a "nudge" is because it the ball and paddle have a world limit. What's actually happening is the ball hits the paddle, moves it back, then the ball hits the world limit(happens quickly, wasn't noting that), and the paddle moves back into place once the ball leaves. If I turn off world limits for the paddle the same sequence of events happens except the paddle does not move back into place.
#7
11/19/2006 (11:28 pm)
Anyone else give this a shot?
#8
04/19/2007 (1:02 pm)
When you do oncollision..setpositionX on the paddle, do the same to the ball at the same time, so it doesn't get stuck when the paddle moves forward.
#9
04/23/2007 (10:37 pm)
@Matt: Out of curiosity, how'd you get the Mac package down to 3.1MB? My binary is >8.0MB and I turned off all debugging options, etc...
#11
06/07/2007 (12:36 am)
Thanks Matt! This is pretty awesome. Is the Windows build still "coming soon"?

Torque Owner Matthew Harris