[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] networking example
- To: pygame-users@xxxxxxxx
- Subject: [pygame] networking example
- From: "Jake b" <ninmonkeys@xxxxxxxxx>
- Date: Fri, 25 Apr 2008 19:51:25 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 25 Apr 2008 20:51:31 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=NtH7HdkJgMwsK+YmpYnHAtiJtG70kpzwwRavrsTtKUE=; b=E4xX6a86L4tKzv+hgK3eP9xHtC7H6QrQfgIjKxVokPtEnH2++cybOX21O0eNuIrD0S7t7ui8gtX5aPm5DDV1ZR5GJlPQtuApz6FXgJa+ODVke7yILbjRxTpjZaZGsGo9IOq71J+1L6o/S1J7XTv9014qgVR3xt//+OYaAPgXEQE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=jNXt9Cb7kREkqpH82LohA2DosUcL+4VENLFLaflziM7TV1dGWQ4XNxyAzeQwEhuzyV4IdmNs+oRbaTmIze3jOsQ3Jog1WFV//+NrH/EQgNlZa0mXMTycPhvt/47wHJDxub9diFZwQn38r6RvgzwD+Iex9Jw5TuJZhrXpPdlZDkA=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I'm looking for a tutorial or basic sample code that does networking
in the way described:
I'm trying to do something like: example: the classic game asteroids
modified to have 2 player ships at the same time.
I will have a group of asteroids and of bullets. My guess is that I
will have (1) a server process and (2) a client process.
When a player would normally fire, he tells/asks the server, which
will pass any bullet spawnings onto the players. The server checks for
bullet on asteroid collisions, and passes the deaths, and new spawns
to the players.
I don't think I have to pass any physics updates to the clients,
except where there are collisions / spawns / deaths. Otherwise the
clients can tell where stuff should be since they are told its
velocity.
How do I do this in pygame? ( Does Pygame support the libSDL sdl_net
module? I didn't see it in the docs? looks like it maybe be a future
feature? )
I'm planning to only use this on the LAN, maybe that will make some
code simpler having minimal latency?
thanks, ( hope that was coherent :P )
--
Jake