PDA

View Full Version : Abstracting game communications with pipes


Steven
2004.07.08, 06:45 PM
Is it viable (read: fast enough) to use pipes for same-process communication in games? I see this as making network play much easier, because it wouldn't matter whether the player was on the local computer or on a remote one; a file descriptor would point to them either way.

OneSadCookie
2004.07.09, 01:56 AM
Personally, I'd put the abstraction a bit higher... for example, route all your communications through

void SendMessageToPeer(struct Peer *peer, struct Message *message);

That way you can replace the transport layer at will, depending on the peer, without paying any performance penalty for intra-process communications (a simple queue).