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 09:40:27 +0000
User-agent: Mutt/1.5.11

I've now mailed Stephane my latest patch.  If anyone else is interested,
I can send it to you too - I'd just rather not spam the ML with it.

Here's my reasoning behind the various parts of the patch.  In many of
these cases, the changes I've made are quick and dirty hacks.  I would
rather have waited and put proper solutions in place, but it's important
right now to get something out as soon as possible.

I've set the game to compile with "-O2".  Actually, I've set
"configure.in" to use that, but it seems that "configure" hasn't been
remade with that value.  I'm not sure whether it will be when the game
is compiled.  After Kyle's suggestion, I played briefly with -O2, -O3
and -fomit-frame-pointer.  I couldn't see any significant difference
between them, although all of them were significantly less
processor-hungry than before.  Since "-O3" and "-fomit-frame-pointer"
can cause problems with debugging, I've opted for the safer "-O2".

The campaign had a bug before where buildings that were disabled in one
map didn't get re-enabled in the next.  I've edited the campaign files
to call guienable() where appropriate.  I've also changed the campaign
text to be a bit easier to read.  I've changed the values for the length
of the strings in a hex editor so that the game doesn't crash when
trying to load these changed files.  Since the last two maps are
almost impossible to finish now (I only managed them by cheating), and
since they don't really fit with the campaign's story anyway, I suggest
we just delete them.

Many messages that were previously sent to the standard output have now
been hidden behind "if (verbose)" statements.  Where there was no
"verbose" variable previously defined, I've created a private "static
const bool verbose = false" statement in the relevant class definition.
These statements were annoying for players and only very rarely useful
(I've made some effort to keep the ones I've actually seen be useful).
I've put these if-blocks in quite haphazardly as I've seen messages
being printed during the game.  There are probably more that could be
added.

I've fixed a bug that caused the game to crash while closing:
a call to speex_encoder_destroy() should have been a call to
speex_decoder_destroy().

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.

The inn bug (see earlier messages for background).  Previously, globs
would subscribe to an inn if it had any free slots, then some time later
be accepted or rejected.  If the inn was nearly full of wheat, but could
still take more fruit, any number of globs could subscribe to the inn,
then be rejected when it turned out they weren't near fruit.  At which
point, they'd idle for a moment before re-applying.  As a quick fix,
I've set the globs only to apply to the inn if they have a chance of
being accepted.  Although they can still spend some time being
unnecessarily idle, the bug is essentially fixed.  To offset any
potential slowdown this causes in the game, I've optimised a related bit
of code in the function that accepts/rejects globs - the function now
does exactly the same thing, just a bit quicker.

I've made the syncRand() function inline.  This doesn't seem to make
much of a difference at -O0, but although I've not checked it with -O2,
I would expect it to make some difference there.

I've set the IRC server to irc.globulation2.org.

        - Andrew




reply via email to

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