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

Re: Where do I begin?



Henningsen wrote:

> The one point where I disagree with Steve is that I think if you want to
> really write good real-time network code, you have to plan that in from the
> start with a view to minimizing the size of the data you have to exchange
> over the network in order to keep clients synchronized.

I think the problem is not so much minimising the amount of data - but in
resolving the *nasty* problems of simultaneity.

Two players are walking down a corridor - there is a gun lying in the
middle.  Both reach to pick it up.  Who gets it?

Well, if you have the local game engine decide then you can run into a situation
where both players have the gun.

If you have a central server decide then there may be a lot of latency
between it and the players such that whenever you pick up *anything*, there
is a long delay before you have it.  Picking things up isn't perhaps so
bad - but shooting certainly is.

Solving these problems is what makes networked games so difficult - and you
certainly *do* have to plan a comprehensive solution up-front if you want
it to work flawlessly.

However, to expect someone who is writing their first game to attack this
*incredibly* nasty problem as the very first up-front thing they do is
ridiculous.

Do something quick-and-dirty the first time around - don't sweat the hard
problems - then you'll know what those problems are for your second game
and you'll have the knowledge of what you did wrong the first time to help
you design it right.

> Remember this: One reason Carmack is so good is because he isn't
> shy do ditch code and start again from scratch.

...and that's my advice too.  Write *something*. *EXPECT* to get some
things wrong...then in six months time, put your first game out to
pasture and write something *REALLY* good for the second effort.
 
----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1@airmail.net>   WorkMail: <sjbaker@link.com>
URLs : http://www.sjbaker.org
       http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
       http://prettypoly.sf.net http://freeglut.sf.net
       http://toobular.sf.net   http://lodestone.sf.net