[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Enigma-devel] Re: network 2-player game
From: |
Tacvek |
Subject: |
[Enigma-devel] Re: network 2-player game |
Date: |
Wed, 15 Mar 2006 16:35:10 -0500 |
----- Original Message -----
From: "Ronald Lamprecht" <address@hidden>
To: "enigma-devel" <address@hidden>
Cc: "Tacvek" <address@hidden>
Sent: Tuesday, March 14, 2006 4:02 PM
Subject: network 2-player game
Some experiences and thoughts about a future network 2-player game
feature.
A few months ago I fiddled with enigmas event handling to get some
practical experience how the game behaves on queuing and delaying events.
I did that because I had 3 different approaches for a network game
solution. When I did knew what basic features enigma needs to support I
did postpone the direct efforts and did concentrate on the features for
the next release.
But of course I will share the results if there is interest:
Tacvek wrote:
AIUI there wold not be a need for the levels to be in sync. This is
because the way the
server-client split was designed, only one of the the two would be
running the underlying engine.
The other player would be running just the client end of Enigma, which
would be sending information about input to the server,
and displaying images/playing sounds when the server commands it to.
If that model is kept then it would be entirely possible to be playing
levels that are part of a levelset you do not have locally.
(The other player would be the server).
Really?
That is how I understand the very early beta beta I looked at to work. I
have not kept up on enigma since sometime back in the arch days so this may
have changed.
Besides that, have a look at the timing: Enigma is a "physical" simulation
with an event time basis of 10 ms, the actors moves are integrated on a
2.5 ms (!) basis. An internet roundtrip even on UDP basis as we do, will
take something in between 200 - 1500 ms ! The demands of enigma are due to
complex physical simulation dimensions higher than on other networking
games.
It depends on what level of netwroking support we want.
For a lan any such delays are so small they make almost no difference. For
the internet, well that is quite different.
Your expanation works in that case unless the the synchronized worlds of
both clients desync, which is a possibility,
especially in the case of a lost UDP packet.
But I'm sure such a problem can be overcome, as it always has in the past.
The demanding task of the network game is not the event queueing and
networking stuff but the cloneing of the world! I started with the Lua
world part -- that is the reason we need to upgrade to Lua 5, because it
supports serialization.
The major problem with Lua 5 was the undocumented changes to the error
system. It appears to be possible to use the metatable system to re-create
tags (to the extent that they are needed), but i was unable to figure out
how to account for the changes in the error system.
Any comments and additional ideas?
Still There is no reason to require both players to have level files that
are the same.
One player should be the server (In name depite having no more real
repsonsibilities than the other. this would be the person who starts
listening for the UDP packets coming from the other player. (I ammume the
system planned will have one person give their IP to the other person and
the IP of the second person is determined by the source address of recived
UDP packets.)) That "server" should be able to send the level to the other
player. The engine would then use that. It would a;so be useful in the case
of testing multi-player levels.
Ronald