This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
RE: check_extract_action
- From: "Stanley Sutton" <sutton at t-surf dot com>
- To: "Hans Ronne" <hronne at pp dot sbbs dot se>
- Cc: <xconq7 at sources dot redhat dot com>
- Date: Tue, 6 Aug 2002 07:45:42 -0500
- Subject: RE: check_extract_action
You make some very good points, which is why I haven't modified the code
yet. I still need experience. Which is why I'm doing the
documentation, to learn a bit more about the code before changing it.
The only commercial computer games I've played extensivly are Civ I & II
and Alpha Centauri. I also played Galaxy II pbm back in the early 70's,
and some Star Probe/Star Empire from TSR about 10 years ago. I also
played a lot of the Avalon Hill board games in the late 60's and early
70's.
After I finish the documenation, I plan to try to build a game from
scratch, probably similar to Galaxy 2, since it was played on a hex
board, with farily simple rules. The only problem is that, once again,
the tactical scale is different from the main board scale, both in
distance and time.
Oh well, I can leave out the tactical while learning GDL.
-----Original Message-----
From: Hans Ronne [mailto:hronne@pp.sbbs.se]
Sent: Tue 06-Aug-02 05:40
To: Stanley Sutton
Cc: xconq7@sources.redhat.com
Subject: Re: check_extract_action
>I think the check_extract_action should be changed from (with varible
>names changed :-) ):
I think what you propose both for the check_extract_action and
do_extract_action is logical. However, have you checked what the
extraction
code actually is used for? That's the first thing I do before I start to
hack some part of xconq. The best way to do that is to search the lib
files
to see what games use the feature and for what.
I just did a search for "acp-to-extract" since I was not sure what this
code is being used for. It turns out that only one game in the whole
library uses the extraction code: an experimental module called
ancient.g.
The game is quite different from most other xconq modules. It's hard to
tell how it's supposed to work since the game is not yet playable, but I
think it's an attempt to emulate Age of Empires. These independent units
that you can extract (I thought this was really weird, which is why I
started to look into the whole thing) are berry bushes that you send out
your villagers to harvest, just as in AoE. That this stuff is still
experimental is evident from the fact that the word "villager" is
hard-coded into the ai code for extraction (need_this_type_to_collect in
ai.c).
So what can we learn from this? The good news is that since this code is
not used in a working game you are free to modify it as you wish. The
bad
news is that since this code is not used in a working game there is no
way
to test your modifications. Unless, of course, you are willing to
complete
ancient.g. Which may not be such a bad idea :-). As I pointed out a few
weeks ago, kernel hacking and game writing go hand in hand. You hack the
kernel because you need a new feature in the game that you are writing.
One thing more that you may want to check is how the ai code deals with
extraction. How will it react if a partial extraction is executed, as
you
suggest, which returns less than the amount desired? Is the ai code
smart
enough to realize that less will need to be extracted next turn? Or will
it
just continue forever trying to extract the full amount, and failing
each
time? (BTW, the ai code for handling berry bushes seems to be this
non-building PLAN_IMPROVING that Lincoln and I were discussing a few
days
ago).
Anyway, I have one comment on the extraction code. I think you may want
to
use the for_all_stack_with_occs macro instead of just for_all_stack.
Berry
bushes are of course unlikely to have occupants (except for aphids), but
consider the case of an city containing a granary!
Hans
Hans Ronne
hronne@pp.sbbs.se