Tutorial: Online Multiplayer with PodSixNet

Post your own tutorials, guides and demos.

Post » Fri Aug 20, 2010 5:33 pm

It's a Construct issue. That would explain why it's not working for alee either since "\a" is also translated into a single character. I found the problem and the fix in "Runtime\system.cpp" line 5040, the line was commented out.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Fri Aug 20, 2010 5:51 pm

[quote="R0J0hound":36qomc2p]It's a Construct issue. That would explain why it's not working for alee either since "\a" is also translated into a single character. I found the problem and the fix in "Runtime\system.cpp" line 5040, the line was commented out.[/quote:36qomc2p]
That's good news! Does it mean also, we just have to wait for the next release to be able to work with it? Or do we need to submit to the bug tracker? (I apologize if this is a stupid question, I'm uncertain :oops: )

Anyway, thank you for the help and the quick finding :)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Fri Aug 20, 2010 6:23 pm

Yea it should be in the next release.
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Fri Aug 20, 2010 7:37 pm

but why would construct break a standalone .exe file that i didn't compile? :S Or was the .exe broken but for some reason works on other people's computers but not Tulamide's and mine?
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Fri Aug 20, 2010 9:25 pm

It's because of how python reads strings. The character combinations "\t" and "\a" are converted to some special character. This paths are messed up because of this when those combinations are in the path.

So instead of this correct path:
C:\Documents and Settings\alee\Local Settings\Temp\capA4.tmp\PythonLibs.zip

python reads it as this incorrect path (the "\a" is replaced by a non visible character):
C:\Documents and Settingslee\Local Settings\Temp\capA4.tmp\PythonLibs.zip
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Fri Aug 20, 2010 11:11 pm

Ah ok. Thanks alot houndy! :D
Can't wait try out podsixnet
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Sat Aug 21, 2010 1:01 am

Wow, what a crazy problem and a brilliant solution. Never would have guessed it was a Construct problem after all. Thanks Rojohound, you're a huge help to the community!!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Aug 28, 2010 4:52 pm

I'm confirming i can now run these examples using the latest unstable build which ROJO fixed this issue in.

What might be cool is some help in making the server in something like pygame and have it talk to construct - This way (unless im mistaken) we could make our servers run on linux for example?
Maybe its better just to write the server in bare python, but its nice to have a GUI :D
Just an idea, but I think the ideal solution for networking in construct is to have the server running on linux - This cuts server costs hugely as linux VPS are very cheap etc.
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Mon Aug 30, 2010 4:08 am

[quote="alee":32cokxyc]I'm confirming i can now run these examples using the latest unstable build which ROJO fixed this issue in.

What might be cool is some help in making the server in something like pygame and have it talk to construct - This way (unless im mistaken) we could make our servers run on linux for example?
Maybe its better just to write the server in bare python, but its nice to have a GUI :D
Just an idea, but I think the ideal solution for networking in construct is to have the server running on linux - This cuts server costs hugely as linux VPS are very cheap etc.[/quote:32cokxyc]

This is a perfectly viable option, however, keep in mind you'd be writing the core of your game python, and not Construct at that point.

The server and client should be executing the exact same routines for things like motion (unless you're doing fixed frame, or perhaps turn based). If you want any kind of interpolation or extrapolation, the client and server must run identical movement code for accurate prediction (physics also).

Which might be rough if you're relying on Construct for anything other than a drawing medium. In which case, SDL or pure pygame is likely better.

Just my thoughts. I'm known to be wrong from time to time :)

EDIT: Though another thought... while Linux is at the end of the day a better server platform punch for punch, if you're writing a game so complicated and optimized a decent windows system will choke up on it and you need to consider superior OS platform... you've probably outgrown both PodSixNet and Construct. Is that even an issue most AAA games have to concern themselves with? I doubt it :)
B
3
G
2
Posts: 31
Reputation: 737

Post » Thu Sep 02, 2010 3:36 pm

I plan on writing a server that is purely maths (made in code) anyway. So it wouldn't be too different writing the server purely in python.

Couple of questions about the tut.

1) It seems you use lists to give each player a unique ID (based on their location in the list). In a MMO style situation, you'd want to make sure that everyone has a unique ID that stays the same for the whole time they are online. Lists would work fine, however, when user 2 disconnects, we want the next user who logs in to take his place, this way we don't end up with a huge list (because the list re-uses empty entries). I assume this is the best way to do it? How do you do this in python, or is there a more appropriate way?

- also, wouldn't each client need a unique "ID" so you can send messages directly to certain clients from the server?

2) I couldn't quite work out how channels work. Can we send messages to all players on a channel? And can channel names be strings? Surely its important to ensure that we can send messages to certain groups of clients, but not everyone connected?

Just thought i'd ask so I understand these more fully. Thanks again scidave, seems to work really well!
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

PreviousNext

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest