What's the best Python module for online play?

For questions about using Classic.

Post » Mon Jun 27, 2011 8:18 pm

As the title says.. what's the best module to use with python in construct with good online capabilities?
 

When I say online capabilities I mean 1 Player vs other, hability to create a game and other join to duel and available game list
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Mon Jun 27, 2011 11:25 pm

I think there is only one Python module that has actually been used with Construct before, and that's PodSix. Not sure if it's the best, but there should be a forum post in the "Tutorials" section on it.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Jun 27, 2011 11:39 pm

[QUOTE=Jayjay] I think there is only one Python module that has actually been used with Construct before, and that's PodSix. Not sure if it's the best, but there should be a forum post in the "Tutorials" section on it.[/QUOTE] Ya I know about PodSix but if I remember.. someone said this isn't very good for online applications(maybe for simple games shouldn't be a problem but it isn't the case) and there is another one better.. I think it's Pygame but maybe there are others
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Tue Jun 28, 2011 9:56 pm

I've looked at all nearly all the Python modules for networking and the best/easiest IMHO is PodSixNet. There is Mastermind (which supports UDP and does work with Construct) and is probably better for action games:
http://www.scirra.com/forum/udp-online-network-connection-sample-project_topic39868.html
http://pygame.org/project-Mastermind+Networking+Lib-859-.html

Since I wrote the tut a new library AstralNetworking was released in Beta:

http://pypi.python.org/pypi/astralnetworking/0

This library is a high level wrapper around either of the above two libraries. So stick with one of the three options above.

Pygame doesn't have networking/online support.

As far as PodSix not being good for online...I don't think that is true...

Check out this game that uses PodSixNet:
http://infiniteplatformer.com/

I think it is perfect for turn-based and slower games like RTS or something like that. Not sure how it would fare for fast action games (poorly probably), but since it uses TCP it isn't well suited for that.

If you want to make an action game then whether you choose TCP or UDP you will need to also use lag compensation techniques (i.e., interpolation and extrapolation).scidave2011-06-28 22:10:36
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Wed Jun 29, 2011 10:44 pm

Ya I saw that Astralnetworking in another post from you..
It's a turn-based strategy game but with a server who hosts all the games created..

It's really a great doubt as to which module should I use and avoid wasting time for nothing..
I will start with podsixnet then, do you think it would handle good for a turn-based game but with a potential for a lot of players?
something like Diablo 2 game, many players inside a lobby and they can create a game and other joins it(with max players) then people can search for those games while chating, etc.Guif0DA2011-06-29 22:46:41
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Sat Jul 02, 2011 12:15 am

>>I will start with podsixnet then, do you think it would handle good for a >>turn-based game but with a potential for a lot of players?

Podsixnet is by far the best one for Turn-based-games. Check out the forum with Juryiel's questions as he seems to be using Podsix just fine for his game. Note to test lag across the internet...it is in the tut to try out the lag simulator to test performance. As far as lots of players...the most I've tested at one time was about 10 but the infinite platformer (http://infiniteplatformer.com/) game by Chris is supposed to support a lot more than that...just not sure the max. I'm not positive but you might gain better performance in PodSixNet using JSON for serialization vs the default binary encoder, but that is for advanced users!

>>many players inside a lobby and they can create a game and other joins >>it(with max players) then people can search for those games while chating, >>etc.

Yes, this is easily supported with PodSix. I showed an simple version of this in the Dungeon escape game where players join the game, chat could easily be added (based on the chat example) and it detects when enough players had joined. You might have to use a module to deal with routing traffic to the server unless you have manually configured port forwarding on router or server is internet facing.

http://stackoverflow.com/questions/294504/python-upnp-igd-client-implementation

scidave2011-07-02 00:16:06
B
8
S
3
G
7
Posts: 835
Reputation: 5,313


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest