[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] SOC Proposal: Networking for Pygame



On 5/7/06, Rene Dudfield <renesd@xxxxxxxxx> wrote:
But should lossy data be considered for simple networking?  If so I
think giving the send method, or argument a lossy flag would be good.
So that the game can tell networking if it cares about this type of
data.  Just using a udp 'connection' would be probably be enough.

I think the answer to including "lossy" considerations to "simple
networking" depends on what "simple" means. I get the impression from
the wiki page that the project proposal is asking primarily for
something simple technically and in terms of features (i.e. a thin
wrapper of underlying ablities). But if "simple" referred only to the
ease of use for client code, it would mean a very different design, in
my opinion.

For a "simple to use" api, I definitely think letting a game specify
"lossiness" of data sent should be part of simple networking, In
particular I would want to be able to specify whether an individual
packet is guaranteed, and whether it is ordered as 2 seperate flags.
The newer versions of DirectPlay (component of DirectX) allow you to
do that, and it really can make it simpler and clearer. While making
an API let the user pick between UDP (not guaranteed & not ordered)
and TCP (guaranteed and ordered) is simple technically, it's just a
long way around for a user to try and get things to work as close as
possible to the way they want them to work.