Work this week

29 views
Skip to first unread message

Chris McCormick

unread,
Apr 18, 2010, 10:44:48 PM4/18/10
to pods...@googlegroups.com
Hi All,

Just though I'd let you know that I am going to be hacking on PodSixNet this
week. I'm going to be putting it into the MMO type of game I've been working on
<http://infiniteplatformer.com> and I want to make sure it's ready for that use
case. Here is the TODO list I'll be working on:

* make it threadsafe (I know how to do this already from another project, it's just a matter of doing it)

* investigate TCP_NODELAY http://gpwiki.org/index.php/Optimizing_Your_Online_Game_Bandwidth#Nagle_Algorithm

* example code to show lag time between server and client

* implement UDP option
* connection UDP
* connectionless UDP

* load/speed testing script

* pyglet example

* State in documentation that *_Network means you can replace '*' with the incoming message identifier.

* Allow the client to connect to more than one server.

* High CPU usage reported? (about 3.5% CPU when doing nothing, true for both server and client; on Mac Leopard, not affected by changing sleep times to 0.01)

Chris.

-------------------
http://mccormick.cx

--
You received this message because you are subscribed to the Google Groups "PodSixNet" group.
To post to this group, send email to pods...@googlegroups.com.
To unsubscribe from this group, send email to podsixnet+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/podsixnet?hl=en.

|2.

unread,
Apr 19, 2010, 8:45:35 AM4/19/10
to PodSixNet
I'll be following closely on the progress, so don't hesitate to post
minor progress here...

On Apr 19, 5:44 am, Chris McCormick <ch...@mccormick.cx> wrote:
> Hi All,
>
> Just though I'd let you know that I am going to be hacking on PodSixNet this
> week. I'm going to be putting it into the MMO type of game I've been working on
> <http://infiniteplatformer.com> and I want to make sure it's ready for that use
> case. Here is the TODO list I'll be working on:
>
> * make it threadsafe (I know how to do this already from another project, it's just a matter of doing it)
>
> * investigate TCP_NODELAYhttp://gpwiki.org/index.php/Optimizing_Your_Online_Game_Bandwidth#Nag...
>
> * example code to show lag time between server and client
>
> * implement UDP option
>         * connection UDP
>         * connectionless UDP
>
> * load/speed testing script
>
> * pyglet example
>
> * State in documentation that *_Network means you can replace '*' with the incoming message identifier.
>
> * Allow the client to connect to more than one server.
>
> * High CPU usage reported? (about 3.5% CPU when doing nothing, true for both server and client; on Mac Leopard, not affected by changing sleep times to 0.01)
>
> Chris.
>
> -------------------http://mccormick.cx

Chris McCormick

unread,
Apr 19, 2010, 9:25:14 AM4/19/10
to pods...@googlegroups.com
Hi,

Ah ok, well here is what I did today:

* Made Server and EndPoint threadsafe by using a private socket map for asyncore.
* Use TCP_NODELAY to tell the instantly send packets as soon as they are ready.
* Made a proper setup.py file and moved everything into a subdir.
* Updated README to reflect new setup system.
* Example to show lag time between client and server. Server sends pings to clients and measures round-trip time.

Tommorrow I'm going to work on an option for using UDP sockets instead of TCP,
then turn the tests into proper doctests so they compare to the correct output,
then I might do the multi-threaded server example if I get time.

I was getting round-trip times of 300ms from my laptop in Western Australia to
my server in USA, which is pretty much the fastest they will go over that
route. Will try some lag time measurements over the LAN tommorrow too.

Thanks for your interest!

Chris.
-------------------

scidave

unread,
Apr 20, 2010, 11:01:38 PM4/20/10
to PodSixNet
Great update!

I've been using a free tool called "TMNetsim" to simulate long lag
times and I thought the others might find it useful in their testing.
You can simulate TCP latency and dropped packets and see packet
stats. I've found it useful to see how my game might run on slower
networks. http://tmurgent.com/Tools.aspx

Dave

Chris McCormick

unread,
Apr 21, 2010, 9:58:47 PM4/21/10
to pods...@googlegroups.com
Hi Dave,

Seems like a cool tool, thanks for sharing.

Yesterday I updated the unit tests so that they properly self-verify, rather
than just outputting the results without checking them. I also fixed a small
bug in Server.py which makes it properly threadsafe.

I had a small shot at making the system work over UDP but that turned out to be
non-trivial. I know how to do it, it just requires more changes to the codebase
than I thought it would.

I'm going to take a break from hacking on PodSixNet while I try and integrate
it into my game. I will commit any bugs I fix in the process of doing that but
probably won't add any new features for a little while.

Chris.
-------------------
Reply all
Reply to author
Forward
0 new messages