glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] IRC (freenode problems)


From: Andrew Sayers
Subject: Re: [glob2-devel] IRC (freenode problems)
Date: Fri, 18 Nov 2005 15:01:19 +0000
User-agent: Mutt/1.5.11

On Fri, Nov 18, 2005 at 03:20:04PM +0100, Stéphane Magnenat wrote:
> Hi Andrew,
> 
> >Explorer damage (see earlier messages for background).  Previously,
> >explorers' ground attacks would hit every square of an attacked
> >building.  This means that a 3x3 building would be hit 9 times in a
> >single attack, and the explorer hitting it would get 9 times the
> >experience points.  This means that explorers increase in levels
> >extremely quickly, and can easily do over 100 points of damage to a
> >building in a single attack.  I've now added a little code to make sure
> >that each explorer attack hits each building only once.  I've done this
> >by storing previously-hit buildings in a std::set, because we need to
> >store a small (but variable) number of building IDs in a way optimised
> >for quick searching.
> 
> Warning ! std::set do not behave the same on all computer, and thus are 
> not network game safe.

Ah, that's an important point.  We should have a system that
automatically checks for that in network-safe code.  In this case
it doesn't matter though - the program doesn't depend on the order of
iteration through a set or anything like that, only the existence of an
element in the set.  That's quite safe.

        - Andrew




reply via email to

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