Cross-window multiplayer network pong!

Made just for fun, pong connected between two side by side computers to create one playing field.

Not very useful mind you, just an interesting project I set out on :slight_smile:

As usual, the game could use more polish, but the original goal was achieved, so I’m happy! :stuck_out_tongue:

What do you think?

Also:
While I’m at least showing it, any explanations for why there’s a lag every 10 or so seconds? It’s caused by the network, and networking is well, very new to me.

How can you be so sure about that? Why wouldn’t it be the GC causing hickups? How large is the lag/latency?

Is the lag you’re talking about the pause that happens at 0:30 in the video ? If this is it, it’s probably not a network issue, unless you’re sending packages and waiting for ack each and every frame . If you’re doing that, you should redesign your game to send only necessary information to other player (i.e. speed and angle the ball bounced) .
If you’re already doing that, so it’s probably caused by GC as Riven said . If you’re using Awt’s classes to manage collision detection/positioning, make sure you do not instantiate a Point or a Rectangle every frame . Instantiate a few and reuse them , just updating its fields .

Anyway, it looks cool, congrats !