Network Pong Demo

Post your Construct-made creations!

Post » Sun Mar 28, 2010 12:25 pm

Here is another simple network program with Construct and Python. This time it is a 2 player online/lan Pong game. After struggling with how to implement it and running into a few bugs I finally came up with a real simple solution. I'm using the PodSixNet Python Library which handles and hides all of the complex logic behind the scenes.

Pong isn't all that exciting, but it is online!!

Run it the same way as the chat program. In a later variation I might add exception handling but for now pick a high port for the server like 5000. See the discussion in the chat program thread about ports. The controls for each player are Up/Down arrow keys.

Get it here (need Construct .99.84):
[url:3cduzl9z]http://www.box.net/shared/rvyryttyzx[/url:3cduzl9z]

This version uses the mouse for Control instead (need .99.84 as well):
[url:3cduzl9z]http://www.box.net/shared/5703uihspa[/url:3cduzl9z]

This is the latest version which supports 2 or 4 players (need .99.84 as well):
[url:3cduzl9z]http://www.box.net/shared/spoafestsh[/url:3cduzl9z]



Next, I'll work on a N-player or 4-8 player networked game. Once, I finish that then I think I'll be ready to write the tut. I'll walk through the PodSixNet library and how to integrate it with Construct to make online multiplayer games. :-)
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Mar 28, 2010 4:27 pm

Way to go, dude, this is sweet stuff.
B
6
S
2
G
3
Posts: 520
Reputation: 2,690

Post » Sun Mar 28, 2010 6:01 pm

Thats amazing, cant wait to see more. Keep up good work
:)
B
2
S
1
G
3
Posts: 49
Reputation: 1,098

Post » Mon Mar 29, 2010 5:46 pm

Very cool indeed.

I would love to have a looky at the cap for this. Looking forward to the tutorial regardless. :)
B
2
S
2
G
5
Posts: 108
Reputation: 1,866

Post » Tue Mar 30, 2010 9:53 am

The first proper Construct online game ever?!! Pretty big deal! Thanks for that scidave! :D

I just hope it's not too hard to incorporate the Python code for this. Looking forward to your tutorial!
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Tue Mar 30, 2010 1:18 pm

I think tutorial is really cool but im sure many people are wanting to dig there teeth into the Network Pong demo lol. But ill be patient to see what else you are cooking up. :D
B
2
S
1
G
3
Posts: 49
Reputation: 1,098

Post » Tue Mar 30, 2010 6:26 pm

You know with a slight modification this could work out to be a VERY fun 4 person hockey (or air hockey) game.

Make the paddles smaller and give it mouse control.

*getting out my quarters*
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Tue Mar 30, 2010 8:38 pm

Worked ok when we tried with PixelRebirth though connection was laggy (might been my fault but can't be sure or PR's or the program itself) and yeah looking good so far though the game itself was a bit boring as ball didn't have any randominess (yes im fully aware that this is more like a technology demo)
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Tue Mar 30, 2010 9:25 pm

Thanks everybody for the feedback. :-)

[quote="Sagal":2njbrr49]though the game itself was a bit boring as ball didn't have any randominess (yes im fully aware that this is more like a technology demo)[/quote:2njbrr49]
You mean you don't like aimlessly bouncing a ball endlessly back and forth??! :wink: You can affect the direction of the ball by moving your paddle quickly up or down as it contacts the ball. Yeah, I never really meant it to be all that exciting, but maybe I'll jazz it up a bit with randomness or with what Guyon suggested which would be kinda cool. I like the idea of using the mouse for control.

[quote="Sagal":2njbrr49]though connection was laggy (might been my fault but can't be sure or PR's or the program itself)[/quote:2njbrr49]
Were you playing over the internet or on a Lan? Do you both have high-speed connections or dialup? I didn't notice any lag on the Lan when I tested it, but I could see it having potential lag over internet. It would be good to know if there were issues with this library, because I can always go with another one if the performance is not good enough.

I'm hoping a new version of Construct will come out with a bunch of Python fixes (editor and private variable access) before I start on the tut. I also want to wait just in case another library might be better.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Wed Mar 31, 2010 12:16 am

Cool, I can't wait to see how this is done. I tested it out, and it works well.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Next

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 0 guests