Hi

I want to implement network in a game.
If I understood, the good way is tu use peer to peer. The problem is that i have no idea how to use it.
Does someone have any exemple ?

(s)
Posted on 2001-09-24 09:16:27 by (scalp)
i have an example using DirectPlay on Iczelion's site, its an old test proggram we used at the start of HE networking, its buggy but it sends a message from one PC to the other and makes all initializations needed for a game session (using DirectPlay)

also feel free to ask me ...
Posted on 2001-09-24 16:23:36 by BogdanOntanu
two other question :

*first, the 3d engine is similar to a 3d shooting game. So, do u think peer2peer is the best ?

*In most of the game, when a player start a game, other player see that game on their machine, how do they do that ?

damn... i'm so a beginner in that aspect of programming...

thanx
(s)
Posted on 2001-09-25 04:22:04 by (scalp)
Scalp, while peer to peer works reasonably well on an IPX network,
it doesn't really function on a IP (internet) network. Broadcasting
is done to a whole network (A, B or C class), and I've seen many
networks where the sysadmins block incoming/outgoing broadcast
address packets. Besides, it's waste of network bandwith to use
broadcast packets on an IP network.
There's some "multicast" stuff going on, but I'm not too sure on how
it works, but afaik it's fairly new, and might not really be suitable for
games.

So, in a situation where you CAN'T just use broadcast, peer-to-peer
(in a normal implementation) would mean that each client has to
inform each other client of what it is doing, meaning that for N clients,
each client has to send/receive status updates to/from N-1 clients....
which obviously generates a lot of network traffic.

A client/server approach means each client only has one connection,
and that's to the server. Sure, this places more demand on the
server, but that's an increased load on *one* machine, not *all*
machines. And besides, a C/S approach makes it a lot easier to
filter out cheating, if implemented properly.

As for player being able to see online games in a browser sort of
thing... this was easy to do back with IPX on a LAN, you'd simply
send a "hi ho, anybody there?" broadcast packet, and open games
would respond. With the internet, again this isn't really possible,
and you'll have to use a "master uplink server" that keeps track
of the game servers that are running.
Posted on 2001-09-25 07:33:25 by f0dder