Announcement

Collapse
No announcement yet.

Little problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Little problems

    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.
    Clash of Civilization team member
    (a civ-like game whose goal is low micromanagement and good AI)
    web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

  • #2
    Hi Laurent:

    Sorry to hear about the problems, but its sure good you found that bug! Can you fix it so the parser won't go inside an unrecognized tag? I think that's best, and it seems it could be done easily.

    Good Luck on your bug finding and fixing!
    Project Lead for The Clash of Civilizations
    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
    Check it out at the Clash Web Site and Forum right here at Apolyton!

    Comment


    • #3
      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.
      Clash of Civilization team member
      (a civ-like game whose goal is low micromanagement and good AI)
      web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

      Comment


      • #4
        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.
        Clash of Civilization team member
        (a civ-like game whose goal is low micromanagement and good AI)
        web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

        Comment


        • #5
          Sounds great Laurent! Any guess on when we can see the AI doing something bright? Or at least non-dumb. . .
          Project Lead for The Clash of Civilizations
          A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
          Check it out at the Clash Web Site and Forum right here at Apolyton!

          Comment


          • #6
            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?
            Clash of Civilization team member
            (a civ-like game whose goal is low micromanagement and good AI)
            web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

            Comment


            • #7
              What was the problem with the parser, Laurent?

              I don't have your email address any more, so if you send it to me I would be grateful.

              Cheers

              Comment


              • #8
                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.
                Clash of Civilization team member
                (a civ-like game whose goal is low micromanagement and good AI)
                web site http://clash.apolyton.net/frame/index.shtml and forum here on apolyton)

                Comment


                • #9
                  Ouch - obviously I didn't think of that one!

                  Cheers

                  Comment

                  Working...
                  X