Tutorial: Online Multiplayer with PodSixNet

Post your own tutorials, guides and demos.

Post » Wed Jul 21, 2010 3:19 am

So did the bugs/limitations you mention in the read me get address?

Python not having access to behaviors, etc? And the crash bug with direct access to strings?
B
3
G
2
Posts: 31
Reputation: 737

Post » Wed Jul 21, 2010 2:11 pm

I've been using PodSixNet for multiplayer since 0.99.90. Accessing private variables works, though the string problem still exists, and python's inability to access behavior variables is still a problem. I have found workarounds to deal with it though. If I need access to a behavior variable, I've just been adding it as a PV for the object, and setting the PV to the value of the behavior variable I want.

My only big complaint is that when you have a condition with python script AFTER a set of actions, the python script will run first, before the actions. This means that when an object is created, and you try to send information about it to all other players, you can't actually access the variables associated with that object until the next tick. I have yet to find a workaround for that problem that isn't a bandaid style fix. That has nothing to do with PodSixNet though.

EDIT:
Oh, I thought I'd add one more thing here. Earlier I had posted about having to run the server as an EXE. Turns out, I was able to combine the server and client into one file. When you enter the game, you have the option to be the server, or join as a client. This works well, and has allowed me to create one version of the game, rather than struggling with separate server and client programs. When I'm ready to test, I just copy the game to each computer on the network using autohotkey. Pretty neat.

Also, Lucid's PY plugin turned out to be a very handy tool for dealing with picking, and multiple instances of objects within python. Sorry, I don't have a link for it atm.
B
3
G
2
Posts: 35
Reputation: 745

Post » Thu Jul 22, 2010 12:20 am

[quote="Zaaephod":1hsaz6vp]When you enter the game, you have the option to be the server, or join as a client. [/quote:1hsaz6vp]
Very cool Zaaephod! Nice to see this capability being used and tested. Maybe we can fix some of the Python quirks you are finding.

[quote="Zaaephod":1hsaz6vp]Also, Lucid's PY plugin turned out to be a very handy tool for dealing with picking, and multiple instances of objects within python.[/quote:1hsaz6vp]
Great plugin. Here is a link to list of plugins that include the python fix plugin
viewtopic.php?f=2&t=5684&p=45344&hilit=python+fix+plugin#p45344

Looking forward to seeing some network games soon! :D
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Aug 07, 2010 11:19 pm

just a question.. why do we have to replace the data in construct directory with those python files..

also, i seem to be having errors egarding strioIO.pyc when running execs..
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Sun Aug 08, 2010 9:21 pm

[quote="hero_bash":27y8gijb]why do we have to replace the data in construct directory with those python files..[/quote:27y8gijb]
I said to replace them all for simplicity....but it is not necessary. All you really need to do is put all of the new files in the Construct directory. So if you do a copy and paste you could select "don't overwrite existing files". Now the reason you have to paste the new files is that the libraries required for Podsixnet do not exist in the regular Python distribution that ships with Construct.

[quote="hero_bash":27y8gijb]also, i seem to be having errors egarding strioIO.pyc when running execs..[/quote:27y8gijb]
Do you have errors when you run the execs I built for the example games (pong and dungeon escape)? If you do not have errors for those, then it means you are not checking all of the include boxes when it comes time to build the executable in Construct.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Aug 15, 2010 12:31 pm

[quote="hero_bash":3ppttfpk]
also, i seem to be having errors egarding strioIO.pyc when running execs..[/quote:3ppttfpk]

Same here. I tried also ticking all the modules instead of the pre-ticked ones. Still gives me that error, but doesn't give me the error when i run it from construct.. :S
I'm running 0.99.92 - Could this be the problem?
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Sun Aug 15, 2010 2:42 pm

[quote="alee":12q9hp4f]tried also ticking all the modules instead of the pre-ticked ones.[/quote:12q9hp4f]
This shouldn't be necessary. My previous answer might have been confusing about checking all the boxes (I meant only checking the boxes for modules that have errors). If you have checked "stringio" and it is still giving the error then I think a bug has been re-introduced.

[quote="alee":12q9hp4f]I'm running 0.99.92 - Could this be the problem?[/quote:12q9hp4f]

Maybe, a bug might have been re-introduced in newer versions.

To help troubleshoot could you please run the exectuble pong, chat, or dungeon escape games I posted to the forum? I need to see if those binaries cause you errors.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Aug 15, 2010 5:36 pm

where are these executables? Theres only .cap files in the link you posted initially.

I tried compiling dungeon escape client. Same error. If i put StringIO.pyc into the same folder, it no longer shows the StringIO error. However, it just says no module named random or a similar module related error.

It seems construct isnt exporting the modules properly? Have i configured something wrong?
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Post » Sun Aug 15, 2010 6:30 pm

[quote="alee":sw8tnmgi]where are these executables?[/quote:sw8tnmgi]

Dungeon Escape
viewtopic.php?f=4&t=6239

Network Pong
viewtopic.php?f=4&t=6102

Network Chat
viewtopic.php?f=4&t=6034

[quote="alee":sw8tnmgi]It seems construct isnt exporting the modules properly? Have i configured something wrong?[/quote:sw8tnmgi]
No, I don't think so...but I don't have my dev system setup right now to confirm. Try out the above executables. I think they will work fine. Python was broken in versions prior to 99.8 and this was the exact problem so I think somehow the bug is back. Need to post bug report to say Python is broken....anyone else having problems with Python???
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Aug 15, 2010 6:45 pm

Hmm i get the same error with your .exes (i've tried dungeon client and the server so far). I get this error when running it in a folder with python26.dll, _socket.pyd, select.pyd, and StringIO.pyc in:

"Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named random"

If i run it straight from the zip i get an error about no module PodSixNet.Channel

:S i confuseeee
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 0 guests