[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Message passing

From: Daniel Heck
Subject: Re: [Enigma-devel] Message passing
Date: Mon, 1 Mar 2004 23:06:45 +0100

Johannes Fortmann wrote:

> I'm a bit confused as to how the current planning for message passing 
> is:
> There's a "server" part and a "client" part, both in their respective 
> namespaces. The server is responsible for handling the overall game 
> state, the client handles the local game state.

That's the idea at least, yes.  There's still a lot of direct
interaction between the two that we will need to eliminate in the long

> Now my basic approach would be to build a message-passing interface 
> with a message class (already partly implemented) and send messages 
> between server and client. This would mean that the messages have to
> go through a central function (handle_message), and could be
> redirected, for example to a network_client class. The server could
> then send its messages to all "connected" clients. However, this is
> not implemented: the server calls methods Msg* instead.
> Perhaps this is planned. Is it?

Yes and no.  The Msg_ functions were just an easy way to partially
design the network protocol.  Basically, every Msg_ function corresponds
to one kind of message that needs to be sent either from the client to
the server or vice versa.

> Shall I write a "network" class for posing as host/client and passing 
> messages around in the network? Do we use reliable or unreliable 
> packets?

Yes, go ahead :-)  I think we may need both reliable and unreliable
packets.  Changes to object properties and commands like "rotate the
inventory" etc should probably be passed reliably, but we may need to
use unreliable packets for messages like "actor # has position
x/velocity v".  At least that's how some other games do it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]