Simple Network Chat

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Chat with smart animals using the OpenAi Chat GPT 3 API
  • Here is a simple network chat program that I worked up today to learn more about network programming with Python. It may be one of the first Construct network programs!!

    <img src="http://i42.tinypic.com/2ntfo8o.jpg">

    http://www.box.net/shared/o766hzisiy

    The Python dependencies should be redistributed with the client and the server. For, the server you just put in the port that it will listen on (you should select a high number like 6000). For the client, you pick the player nickname, the IP address of the server, and the port of the server. I only tested with two clients but it should support many more. Time permitting I'll add new features to this or move on to a real network game.

  • Nice one scidave!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Looks awesome. Good job.

  • Very impressive, Great job scidave.

  • Great news! Finally, Construct will communicate. I'd still prefer a plugin, but with all your work so far you've pointed to an alternative that's worth to try.

    I thought I should point to this link about port numbers as early as possible that helps avoiding conflicts with multiple port use.

  • Great news! Finally, Construct will communicate. I'd still prefer a plugin, but with all your work so far you've pointed to an alternative that's worth to try.

    I thought I should point to this link about port numbers as early as possible that helps avoiding conflicts with multiple port use.

    Officially, there's supposed to be a Multiplayer Plugin by 1.0's release.

  • I don't think anyone's working on a multiplayer plugin any more, so I don't think there'll be one at the 1.0 release.

  • That's disappointing. Someone should change the wiki's FAQ then.

  • Thanks everybody. Python really opens up lots of interesting possibilities.

    I'd still prefer a plugin, but with all your work so far you've pointed to an alternative that's worth to try.

    I would prefer a plugin too. The pros with a plugin are you would have better speed and that it would be better integrated with Construct. The positives for Python is that it is really easy to add network support, the code amount is minimal (e.g. the Chat Server is only 40 lines of Python and about half of that was cut and paste boilerplate code) and it is easy to extend the support without making a whole new plugin. Once I move on to an actual game I'll let you know if I hit any walls with integration with Construct behaviors and other stuff.

    Also, good link about the port numbers.

    In general, you want to set the server to listen on a port higher than 1024 since it takes an admin to listen on low/privileged ports. For those curious about what is listening on their system you can type: "netstat -an | more" at a command prompt and you will see ip addresses and ports. The server uses TCP so nothing can be listening on the TCP port you choose.

    I updated the chat server to show what IP it is listening on. I didn't put any error checking on the port so pick a high port or do a netstat to see what is available.

  • Im more or less wondering how to develop this.. Like will you release source or make a tutorial on how adding networking can be done? Ive got a game in development and have been looking into this networking for a while.

  • Ive got a game in development and have been looking into this networking for a while.

    What type of game are you making? Right now any type of network chat program is trivial with Construct and Python. However, I am still experimenting with even the simplest of two player network games. One thing I don't want to break is Construct's ease of the event system and built-in behaviors, and graphical drag and drop design.

    It is non-trivial figuring out how to fit the Python library into Construct's event system, without resorting to writing most everything in Python code, for a real game. I think once I figure out the best method then it should be fairly easy to follow the example and do similar games. It is kinda like the inventory system for the adventure tutorial, it took me quite a while to come up with the scheme and then everything looked really easy when it all came out in the end.

    Like will you release source or make a tutorial on how adding networking can be done?

    I do plan on creating a tutorial and releasing source to a simple game and the chat program sometime before 1.0. It would help to know what type of network games people plan on making so I can keep that in mind when making the tutorial.

    p.s. Dead reckoning/interpolation will not be supported though. That is far too complex for the libraries I'm working with (at least without much more work) so only simple games without latency concerns will be supported/explained in the tutorial.

  • There is a partial experimental online plugin that Rich was working on.

    You can get it here: http://dl.dropbox.com/u/604141/Public%2 ... plugin.rar

    Say thank you to Sagal for hanging on to it... I lost it accidentally somehow but he still had a copy of it.

    ~Sol

  • There is a partial experimental online plugin that Rich was working on.

    You can get it here: http://dl.dropbox.com/u/604141/Public%2 ... plugin.rar

    Say thank you to Sagal for hanging on to it... I lost it accidentally somehow but he still had a copy of it.

    ~Sol

    I tried it and couldn't get it to work :/

  • > There is a partial experimental online plugin that Rich was working on.

    >

    > You can get it here: http://dl.dropbox.com/u/604141/Public%2 ... plugin.rar

    >

    > Say thank you to Sagal for hanging on to it... I lost it accidentally somehow but he still had a copy of it.

    >

    > ~Sol

    >

    I tried it and couldn't get it to work :/

    Might have issues with newer versions, it's pretty old as far as I'm aware.

  • It might have issues, period. It was really buggy, and was never even finished.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)