 |
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:27
|
|
Just letting know I have hardware problems, so I have trouble connecting to the web and getting e-mail access.
I am also running into memory problems with the game (some OutOfMemoryError showing up from time to time).
I don't know what causes that, as it can come from anywhere. It is more common if I don't have the map hidden, so painting the map eats memory, but I don't know the exact cause. Hopefully, it is something I added recently and I'll find out soon. Anyway, this allowed me to find a weird bug: The xml files, when they meet an unknown tag, bypass it, but the inner tags are processed. Thus, <unknown><civilisation> stuff </civilisation></unknown> will parse stuff as if it was a root tag. This means the (disabled) diplomacy tags can have an effect on the game. Here, the effect was to create additional ais for nothing.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:27
|
|
I wanted to do it, but it's a bit harder than expected. I'll do it when/if I get the (other) memory problems fixed.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:27
|
|
All is fixed. I found out what I did wrong with the new ai (did things even when the 'old' code was supposed to run), and corrected the parser.
|
|
|  |
 |
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:27
|
|
Well, the ai doesn't do anything dumb. The problem is it doesn't do much right now. It just behaves like the old one, but a bit more cleverly (won't go on a silly path if it can see it beforehand), and eats more memory. I confess spending lots of time playing galciv which hinders my coding a bit, but gives some ideas. Typically, galciv's ai is not so good military-wise (tactically), but good on economy, expansion, tech and diplomacy. These areas are not really handled by Clash ai now. I focus on Carthago scenario to tune the beast, so I will have to teach the ai to change build orders if it sees a wall for instance. That is not straightforward, and I want to have it behave withut eating too many resources before I go into that. Performance tuning is a bit long and painful, particularly since this happens in separate threads. I suppose by now you understood I wouldn't give a date . I can send you the code whenever you like if you want to test what it's like. Otherwise, I keep tuning it and will only send when I feel it acts better than it used to?
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:27
|
|
Hi Gary, my e-mail is laurent.di.cesare@wanadoo.fr.
The problem was that if you meet a tag that is unrecognized, the current object in the stack remains the same. Say you have:
<root>
<correct></correct>
<unknown> <correct></correct> </unknown>
</root>
In root there exists a setcorrect() method but no setunknown() method. What happens is the unknown tag is skipped, and root remains the current level of the stack. When the parser meets correct tag, it interprets it as root.setcorrect, instead of unknown.setcorrect. We had a civ tag at root level, and then a diplomaticstatus tag that was not yet implemented but had an inner civ tag. The outer tag was skipped, and the inner civ tag created an additional civ.
|
|
|  |
All times are GMT. The time now is 05:27. Apolyton Time is 00:27. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|