Automated Pong Machine - Singleplayer & Multiplayer Pong Game!

Hello

This is an automated Pong Machine. It was built using the standard Gmod building parts and constraints, and Wire (An E2 chip controls all components of the machine). Its only requirement is the latest version of Wiremod, AFAIK. You can use it to play against the AI, against a friend or just watch both paddles go at each other :v Here’s a quick explanation on how it works:

IMPORTANT: When you paste the dupe, the machine will have three main parts frozen, both paddles and the ball launcher. Unfreeze all of them before you start playing otherwise, you will not start playing. By unfreezing anything beyond the two paddles and the ball launcher, you are risking prop epilepsy.

  • Each side has a paddle and a chair. The paddles, are by default, on automatic mode. If someone sits on a chair, then that player will take control of that side’s paddle. Use the A and W keys while on the chair to control the paddle.

http://cloud-4.steampowered.com/ugc/25096800538267283/1A0FFDE699C26B7451558941DDEE082BDF99438A/1024x576.resizedimage

  • The main control panel has a bunch of buttons and information that allow you to control and monitor the machine. The white switch is the main power, and it turns the entire machine on or off. The blue power switch activates or deactivates the ball launcher, which allows you to pause the game if you like. There are two displays, one shows either side’s score and the other shows the ball’s top speed. There are reset buttons for each one of them. There is another small display which shows which power buttons are toggled.

http://cloud-4.steampowered.com/ugc/25096800537953406/D8415258248940205BB0262341073930931BA473/1024x576.resizedimage

  • You also have both displays on either corner, so that you can check how you’re doing while you play.

http://cloud-4.steampowered.com/ugc/25096800537962340/C549A95D2944367BB0B86B96479FE3C312DA2272/1024x576.resizedimage

  • The block in the middle is the ball launcher. When a ball exits the field and is deleted, the launcher pops up and places a new ball in play. The ball is launched to the losing player, or at random, if the game stands at a draw.

http://cloud-4.steampowered.com/ugc/25096800537913241/151A6C20F0AD80E0331752E98738425F05F5D8F9/1024x576.resizedimage

  • When a paddle is under AI control, it will automatically track a ball and move according to its position and velocity. The further away the paddle is from the ball or the faster an incoming ball approaches, the quicker the paddle will move to match the ball’s position, and as it closes in, slows down. You still get to benefit from the ball speed multiplier even under manual control.

http://cloud-4.steampowered.com/ugc/25096800537943609/8D102A42C417B02F30CE8FD556A7E516FC93A36C/1024x576.resizedimage

Known issues:

This thing is actually quite stable, more stable than I ever thought it would be. That said, it still freaks out occasionally, usually in the following ways:

• In relatively rare occasions, the paddles will not respond to the ball. This is probably because I actually suck at programming and the code is far less efficient than it should be. Sometimes it can be fixed by restarting Gmod, other times just repasting the dupe is enough. On bad days, nothing works and you’re screwed. The same applies for player control.

• When they get hit hard or move too fast, the paddles may freak out. That’s just Gmod being Gmod. It’s may be fixable, but I found permanent solution even after playing around with weight and physical proprieties. Repasting the dupe works.

• Sometimes, the paddles will be dumb as crap, other times they will annihilate your face in a millisecond. Laugh or cry accordingly.

• Sometimes, the launcher can be an a**. It may toss the ball right in your goalie, not launch the ball at all, launch it to the wrong player or do a number of unexpected things. Be prepared.

• Balls may stop being deleted after exiting the table sometimes. I think this is a problem with the prop spawner itself, but I’m not sure. Reloading the map seems to work.

• The goal counter might not always score correctly, but it works fine most of the time.

• If the ball goes airborne during play, the ball launcher can and will pop up, even though it will not launch a new ball. This is part of how I have things set up, and is not fixable, not without sacrificing the launcher’s ability to toss the ball to players.

• There are probably more issues, obviously :v

That’s about it. Here is the dupe, enjoy! Let me know if you like it.

Really neat dude!