Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 61 to 90 of 103

Thread: Bug Fix Discussions

  1. #61
    vovan
    Emperor vovan's Avatar
    Join Date
    23 Oct 2001
    Posts
    5,725
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:53
    Originally posted by LDiCesare
    The xml reflects exactly what is in the code. Thinking about it first is a good idea as it will also provide you with the interfaces (api) of the (public) classes you will manipulate.
    Well, I have made some progress in the code, and it is time to continue our XML discussion.

    Right now I am working on integrating the new system of diplomatic statuses into the rest of the game. I have pretty much succeeded, and about the only thing left now is the ability to read the stuff from the XML file. I have taken a look at the XML interface, and the ObjectBuilder class, and I think I kind of understand how the process works, but I am still not sure how I should go about putting the stuff together. Though I have not yet attempted to do it, I would like to first have a clear understanding of how the stuff works.

    So, I guess I wil describe the data structure first. There is a class called DiplomaticStatuses. It contains all of the diplomatic statuses for the game. Inside, it has a setStatus() method, that takes in two civilizations, and a StatusStrength object. Now, status strength itself is an abstract class. But the acceptable values for the value to pass in are the children of the class, static classes: War, Peace, and Alliance.

    Sooo, I suppose the XML should then look like this (on an example of delenda scenario):
    Code:
    <diplomaticstatuses>
      <status>
        <civilization>Rome</civilization>
        <civilization>Carthage</civilization>
        <diplomaticstrength>
          <war />
        </diplomaticstrength>
      </status>
    </diplomaticstatuses>
    ??

    Given that I include the xml interface and the appropriate static function in classes DiplomaticStatuses, and all of the subclasses of DiplomaticStrength. Is that how it is supposed to work, or am I missing something?
    XBox Live: VovanSim
    xbox.com (login required)
    Halo 3 Service Record (I fail at FPS...)
    Spore page

  2. #62
    LDiCesare
    Emperor
    Join Date
    03 Jan 2001
    Location
    Ashes
    Posts
    3,215
    Country
    This is LDiCesare's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    00:53
    Originally posted by vovansim

    So, I guess I wil describe the data structure first. There is a class called DiplomaticStatuses. It contains all of the diplomatic statuses for the game. Inside, it has a setStatus() method, that takes in two civilizations, and a StatusStrength object. Now, status strength itself is an abstract class. But the acceptable values for the value to pass in are the children of the class, static classes: War, Peace, and Alliance.

    Sooo, I suppose the XML should then look like this (on an example of delenda scenario):
    Code:
    <diplomaticstatuses>
      <status>
        <civilization>Rome</civilization>
        <civilization>Carthage</civilization>
        <diplomaticstrength>
          <war />
        </diplomaticstrength>
      </status>
    </diplomaticstatuses>
    ??

    Given that I include the xml interface and the appropriate static function in classes DiplomaticStatuses, and all of the subclasses of DiplomaticStrength. Is that how it is supposed to work, or am I missing something?
    You need the xml interface only in the topmost objet, diplomaticstatus, and you have to declare it in the list of classes that the parser recognizes (in FileInput.java or ScenarioFiles.java or both, I don't know exactly which one is used - should check it when I have some time).
    So you don't need it in DiplomaticStatus subclasses (you can look at ElementArchetype/ElementCost in the military moel for an example: ElementCost is an object inside ElementArchetype but has no getXML() method, everything is done by reflexion).

    To get your example working, you need the getXML method declared for diplomaticstatus class, and a public setStatus method, which takes a Status object as an input, and nothing else (again, you can look at ElementArchetype.setCost method).
    The Status object needs a setCivilization (or addCivilization) method (both set and add are OK, add would be better here since you add several). Note hte method names needed can be in any case as the parser doesn't worry about setCost or setcost or setcosT (though setCost is better IMO) for instance.
    Instead of a
    <diplomaticstrength>
      <war />
    </diplomaticstrength>
    I'd suggest only a <war /> tag, with the corresponding setWar() method (as an example, you have the militia tag in ElementArchetype). That forces you to have several setWar, setPeace... methods. You can bypass that by using
    <diplomaticstrength>war</diplomaticstrength>
    and having a single setDiplomaticStrength(String) method instead.

    That's about how it works: getXML() for root tags, then reflexion only. In order for reflexion to work, you need public no-arg constructors in the classes that will be created by the parser, and either setXXX public methods or (but I don't like that) public data members XXX.
    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)

  3. #63
    vovan
    Emperor vovan's Avatar
    Join Date
    23 Oct 2001
    Posts
    5,725
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:53
    Thanks for the response, Laurent, but now I think you will be able to see why I asked about the XML before coding the diplomacy. You, see, the way you described the process, it is not applicable to diplomatic statuses. There is no, and cannot possibly be an addCivilization method in the DiplomaticStatus class. Also, I think quite obviously, the setStatus method cannot possibly only take in one thing as a parameter, because it needs to know which civilizations the status is between.

    Therefore, to make the diplomatic status work properly with your system of XML, I will need to rework the whole system. Oh, well, scratch two-three weeks of work, and start from null.

    EDIT: Actually, I think I know the way to circumvent the limitations of the XML parser we have... So, I might not have to rework everything.

    Only question is, does the name of the class have to be the same as the tag? So, if for instance I name some class XMLDiplomaticStatus, can I just include an XML interface with getTag() method returning "status" and then use <status> tag within the <diplomaticstatuses> tag? The only reason for that would be to not have a <xmldiplomaticstatus> tag in there, which would probably be confusing for the designers.
    Last edited by vovan; January 24, 2003 at 13:02.
    XBox Live: VovanSim
    xbox.com (login required)
    Halo 3 Service Record (I fail at FPS...)
    Spore page

  4. #64
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53
    Originally posted by vovansim
    Thanks for the response, Laurent, but now I think you will be able to see why I asked about the XML before coding the diplomacy. You, see, the way you described the process, it is not applicable to diplomatic statuses. There is no, and cannot possibly be an addCivilization method in the DiplomaticStatus class. Also, I think quite obviously, the setStatus method cannot possibly only take in one thing as a parameter, because it needs to know which civilizations the status is between.

    Therefore, to make the diplomatic status work properly with your system of XML, I will need to rework the whole system. Oh, well, scratch two-three weeks of work, and start from null.
    Hold on there Vovan! I don't see anything that you have described that is incompatible with the current XML setup! Please don't give up on all that work yet

    In similar approach to the rest of the code I would instead have a DiplomaticStatus class that has a static collection of DiplomaticStatus objects. Each individual status object is entered as you said above, and is then stored to the static collection.

    The setCivilization method as you have it will be a bit wierd in that it would be called twice with different arguments. To make it clear you could just have two setters, setCivilization1 and 2. When the store() method writes the DiplomaticStatus object to the collection it can then use the previously set civ1 and civ2 values. (see the xml interface Laurent referred to). Of course if someone puts in DiplomaticStatus Civ1 Romans, Civ2 Huns, and then later another object with Civ1 Huns and Civ2 Romans, it would overwrite the first since your matrix is symmetric.

    Anyway, I think this can be made to work with your existing code with only Minor mods. Of course the final decision whether to tweak or scrap is yours, but please allow Laurent and I to make some suggestions before you scrap it all. . .

  5. #65
    vovan
    Emperor vovan's Avatar
    Join Date
    23 Oct 2001
    Posts
    5,725
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:53
    Well, once again, I feel like an idiot, because I jumped to conclusions without thinking about the problem enough.

    Any way, like I said in the edit of the previous post, I know the way to make this work without reworking my existing code. Any of it, in fact - the only thing that had to be done was to add another class specifically for XML... Sorry about the fuss. I guess feeling stupid makes me think faster.

    As of now, it seems that the system of diplomatic statuses works well. Now, to implement the functionality for changing it when civs encounter each other, and when the user wants to.
    Last edited by vovan; January 24, 2003 at 15:35.
    XBox Live: VovanSim
    xbox.com (login required)
    Halo 3 Service Record (I fail at FPS...)
    Spore page

  6. #66
    Framnk
    Settler
    Join Date
    02 Nov 2001
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:53

    Exchanging Code..

    All-

    How do we keep code in synch on the project anyway? For instance, I have something to add to help the app come up maximized, but where do I put it?

    TIA

    Framnk

  7. #67
    vovan
    Emperor vovan's Avatar
    Join Date
    23 Oct 2001
    Posts
    5,725
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:53
    Well... That's a good question! Unfortunately, we do not as of now have any version control system (although Mark said if we demand it, he would look into it. ) So, what we do, is just basically e-mail everyone the changes we make to the code, and say in the e-mail which files we changed so that it is easier to keep track of the stuff. Also, if you are going to change something that you think other people might be working on, just e-mail everybody in advance about the changes you are about to make. If somebody is indeed working on the same class, they will contact you and coordinate the efforts.

    So far, code collisions have not been a problem, since there were very few of us working at any given time. But with the number of coders increasing, it might be a good idea to actually set up some kind of version control.
    XBox Live: VovanSim
    xbox.com (login required)
    Halo 3 Service Record (I fail at FPS...)
    Spore page

  8. #68
    Framnk
    Settler
    Join Date
    02 Nov 2001
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:53

    Source Control...

    Yes, a source control system would definitely be nice! I know they use CVS for a lot of internet open projects. I use SourceSafe quite a bit at work and I find it's interface to be nice (although with Java you don't get the nice dev. environment integration).

    I'm assuming you guys already have a server running somewhere (that is hosting the Clash web site). Barring that, I always have a server running from my home so I'd be happy to set up a CVS or SourceSafe server on it if you guys would like.

    Of course, it's totally up to the group. If you guys are happy the way things are going, that's totally fine with me as well. Just thought I'd throw it out there.

    Framnk

  9. #69
    vovan
    Emperor vovan's Avatar
    Join Date
    23 Oct 2001
    Posts
    5,725
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:53
    Well, that's exactly the problem, you see. I don't think we have a server. AFAIK, apolyton hosts the Clash site, and I am not sure Mark (the Admin, not Everson ) would want to load it further with a source control system.

    As for the choice of the system, I would personally prefer SourceSafe, as have also had much experience with it, as opposed to CVS, which I have never used.
    XBox Live: VovanSim
    xbox.com (login required)
    Halo 3 Service Record (I fail at FPS...)
    Spore page

  10. #70
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53

    Re: Source Control...

    Originally posted by Framnk
    I'm assuming you guys already have a server running somewhere (that is hosting the Clash web site). Barring that, I always have a server running from my home so I'd be happy to set up a CVS or SourceSafe server on it if you guys would like.
    Hi Guys. Like Vovan says, we have no site for a server at the moment. If we keep the number of coders we have, and there is activity from everyone, going to a version control system would indeed be valuable. Frank, your offer is good, and I apreciate it! But for it to be practical it has to be clear that you're in the project for the long term.

    I guess my proposal at this point would be to keep up as we are for the next few months. This will allow us to monitor how much code actually gets slung around, and also let Frank figure out if he's likely to be dedicated in the long term. Once we have answers to those we can make a more informed decision. If most others want version control, I'm certainly willing to use it.

  11. #71
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53

    Question

    Per a comment of Richard's in the D7 Comments thread.

    Programmers, is there anyone who feels competent to figure out why Clash grinds to a halt on Richard's systems? Richard, can you describe the systems?

    I am not experienced enough to handle this. Can someone take it on in the fairly near future? We need Richard functional so he can fine-tune tech. Maybe start a dedicated thread on it, since significant discussion may be needed to figure out the problem.

  12. #72
    LDiCesare
    Emperor
    Join Date
    03 Jan 2001
    Location
    Ashes
    Posts
    3,215
    Country
    This is LDiCesare's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    00:53
    I really don't have time to check it, but here is a suggestion: Why not trying to shut off all the file output and see if that somehow affects the game? I don't know how streams are implemented in java, but if the game has to open and close a file of 100+kbytes every turn, it might cause problems?
    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)

  13. #73
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53
    Hi Laurent:

    Based on a previous comment from Gary to this suggestion, IIRC he said the files were opened once and then just stayed open. But still its something to check just in case.

  14. #74
    ogj20
    Settler
    Join Date
    21 Oct 2002
    Posts
    20
    Country
    This is ogj20's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:53
    Hi, I'd like to join in with the coding effort, though my Java knowledge is a little limited. I'd like to start by looking at one or two of the bugs to get to know the code, I thought maybe 164 or 163? If those have been done by now then I'd be happy to look at any of the others that still need fixing.

    Who do I need to speak to to get the source code to work on?

  15. #75
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53

    Smile

    Hi ogj20, glad to have you onboard. Just email me and I'll send the code and some new Clash Team member info. I am setting up a wireless network at home today, and so may not be able to respond soon if it takes you a while to email me.

    You could take a shot at 164. I think 163 is something best left to Laurent and me. Richard just made some additional comments on 164 in the D7 Download thread. It appears that one can also colonize water.

    I think the best short-term fix for 164 is to:

    1. ensure colonization cannot take place for a square with farm sites = 0, that will get rid of problems colonizing desert and water. I think its Square.getSites that you want.

    2. change the menu so you can't remove the last bit of population. You'd have to leave at least one population in a square when you pick up. A better fix will come after I refactor the econ code.

    3. an associated fix is that the population can grow very large with lots of food. That should be capped at a 20% increase or so. Try looking at PopulationData.

  16. #76
    ogj20
    Settler
    Join Date
    21 Oct 2002
    Posts
    20
    Country
    This is ogj20's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:53
    I've been having a look at profiling Atilla, trying to work out why it's running so slowly. One problem appears to be that the CivEconomy object is constantly being asked to provide economic aggregates, e.g. army supplies needed and estimated tax income per turn, and works them out by a longwinded iteration through all the subeconomies, even when they won't have changed since the last time it was asked. These numbers were being requested from a process that runs once for each inhabited square, so the whole thing was was scaling appalingly.

    A similar problem was going on when working out manpower requirements for new units, which are obviously identical so long as the unit is still built out of the same elements, but required a creation of a hashmap, and an iteration through it every time the unit archetype manpower was requested, which was munching quite a long time, just to return an essentially constant float.
    Atilla about 30%.

    I think this problem of always iteratively computing relatively constant aggregates from subclasses is probably present all throughout the code, given the extensive use of multilayered hierarchies, and a common approach to minimising the processing involved needs to be adopted if we're going to be able to run whole world type games without scaling nightmares.

  17. #77
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53

    Thumbs up

    Thanks Owen. Agree with everything you say. We'll need to think about design approaches to avoid this sort of issues in the future. But of course we don't want to do too much optimization at this point either. I think you've struck a good balance in finding a few things that can give significant increases. And we know know where to look so we can use better designs when refactoring.

  18. #78
    LDiCesare
    Emperor
    Join Date
    03 Jan 2001
    Location
    Ashes
    Posts
    3,215
    Country
    This is LDiCesare's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    00:53
    Nice job, Owen . I think technology may have the same problems creeping in it, as every tech value is reevaluated every turn. If you see tech stuff appearing in a profiling, we can add a turn number data in all tech parameter objects and compare it to the current turn in order to know whether the computation must be done again. I may try it if I find fights (or fight simulations) start to grow slow.
    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)

  19. #79
    boomer70
    Settler
    Join Date
    10 Mar 2003
    Posts
    6
    Country
    This is boomer70's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:53
    Hi,
    I just joined the team and Mark asked me to look at F152 as a starting point to getting to know the code.

    I have looked at F152 and have a "fix" of sorts. The
    code in MapInputMode was just implemented in a wierd
    way. I have changed the code to basically work the
    way I think the FR wanted. You press an arrow key and
    you get a move order for one square in that direction.

    There is an issue with this however. The arrow key
    logic does not check to see if the path you are
    generating is a "valid" one. So if you arrow key a
    move into a coast the draw routine throws a null
    pointer. The mouse move code seems to disallow moves
    that would be invalid even in the black areas. This
    is probably not a feature we really want since it
    allows you to find all the coasts simply by trying to
    move a unit as far as you can in that direction until
    the move is rejected. Presto a coast square. I can
    do one of two things. I have added the same check to the arrow code. I can look at fixing the bug to delay
    the disallowing until the area in question is at least
    not black.

    One more thing I should add, I had to change the
    keybinding to use CTRL+ARROW because the ARROW keys are being eaten in some component before we even see them. I am trying to track down where exactly but for now this works.

    I am also going to look at F168 to see if there is anything we can do with that unless anyone has a more pressing need.

    -Aaron

  20. #80
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53
    Thanks Aaron, glad to have you on board!

    Having a decent way to organize TF all in one step, rather than unit-by-unit will be great. There is already a mechanism to graphically show selected individual units in the TF box code. When a unit is selected its power bar gets thicker. But probably we want a stronger indicator than that. Please let us know about any gui issues that come up so we can kibbitz

    Great to see you making progress already!

    -Mark

  21. #81
    boomer70
    Settler
    Join Date
    10 Mar 2003
    Posts
    6
    Country
    This is boomer70's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:53
    OK I am putting this in the bug fix thread since it is now a design/work-around type question.

    The problem with the port bug is that the port code checks to see if it is valid to have a port where it is defined which needs the terrain data which has not yet been loaded from the scenario file.

    We could do a number of things to fix this problem. We could change the file format to have terrain data defined much before it is (I am sure there will be other things depending on it down the road).
    We could change the reader to read the whole file and build a DOM model before it creates objects. This would let us have the file be in any order but still process the objects in the order we need them. Probably want to change to a real XML parser if we were going to do this. Not sure why we are using a hand-rolled one anyway.
    Or we could defer the check on the port until after the terrain data is read, sort of like a post process.

    Anyone have a preference??

    -Aaron

  22. #82
    LDiCesare
    Emperor
    Join Date
    03 Jan 2001
    Location
    Ashes
    Posts
    3,215
    Country
    This is LDiCesare's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    00:53
    One thing I am sure of is: No DOM. DOM is evil. It is big, slow, memory-heavy and mostly useless. The handmade xml parser is much smaller than xerxes, and makes distribution of the game as a downloadable zip possible. If we take a standard parser, it will be too big.

    If the problem stems from the fact that terrain is not yet read, we can either put it before in the file (but the various threads will cause problem if the port definition comes in a different file from the current one - I am unsure there is any point in reading each xml file in its own thread).
    The other way is to check port validity later in the game. That is, the setPort method just sets the port, and the getPort methods checks that port terrain is water. If it is not, it resets port to null.
    What do you think?
    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)

  23. #83
    boomer70
    Settler
    Join Date
    10 Mar 2003
    Posts
    6
    Country
    This is boomer70's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    22:53
    Originally posted by LDiCesare
    One thing I am sure of is: No DOM. DOM is evil. It is big, slow, memory-heavy and mostly useless. The handmade xml parser is much smaller than xerxes, and makes distribution of the game as a downloadable zip possible. If we take a standard parser, it will be too big.
    Not that I care one way or the other but the 1.4 series of JDKs have an XML parser and DOM model built in so the download thing doesn't have to be an issue. It is likely to be somewhat slower but I would hate to see us hand roll a DOM model implementation. As long as we don't need it I am OK with the parser as it stands.

    Originally posted by LDiCesare
    The other way is to check port validity later in the game. That is, the setPort method just sets the port, and the getPort methods checks that port terrain is water. If it is not, it resets port to null.
    What do you think?
    I think delaying checking is probably a good way to go.
    The only concern is not getting some feedback when you put a port in the wrong spot but we are planning on having a scenario editor at some point so the editor could disallow the creation of the port then.

  24. #84
    LDiCesare
    Emperor
    Join Date
    03 Jan 2001
    Location
    Ashes
    Posts
    3,215
    Country
    This is LDiCesare's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    00:53
    Come to think of it, the best error managemetn we would need doesn't require a DOM tree but just a stack. That is, you try to resolve a given item, fail, but will retry when its enclosing tag is closed. If it is still an error, you can retry when the next tag is closed.
    That stack of error is a bit like a DOM tree except it doesn't have to hold all data, just the data that needs late resolution or is outright buggy.
    It would take some coding, but I don't think too much as we would just keep the objects around.
    As long as we can make without it, we should. If we have to go to a DOM-like structure (I really hope not), we will first have to plug the current reflection parsing stuff in it. I know it is easy with sax as the current approach stems from that, but don't with DOM...
    Anyhow, delaying the port tag seems the simplest solution.
    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)

  25. #85
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53
    Originally posted by boomer70
    The only concern is not getting some feedback when you put a port in the wrong spot but we are planning on having a scenario editor at some point so the editor could disallow the creation of the port then.
    If we use the dynamic checking approach you could have the getPort() method put out the error when it finds an inappropriate port. The only issue is that the scenario designer won't get that feedback until someone tries to build a ship.

    BTW, I don't like the limitation of only one port per province. What happens if you have an existing province with a port and conquer an enemies' port in an adjacent square? I think multiple ports should be allowed, and for now getPort should just return one of them. We should also label ports somehow so the player knows where they are, but that's a bit less urgent.

  26. #86
    LDiCesare
    Emperor
    Join Date
    03 Jan 2001
    Location
    Ashes
    Posts
    3,215
    Country
    This is LDiCesare's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    00:53
    Just letting know I have coded the postpone stuff. I can't send anything easily right now because my main computer's modem seems out of order and I have lots of work commitments (and also rugby commitments plus time to play NetHack and soon(?) GalCiv ...)around now. I will be able to send my code modifications (hopefully) the first or second week of april (including a plugging of the new ai infrastructure -which is more of a refactoring of the existing code to use plans and threads, so it's not clever right now, but it should be full of bugs we will have to playtest).
    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)

  27. #87
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53
    Hi Laurent! Sorry to hear about all the work committments. I've just gone through a similar period, but the near future looks better.

    Originally posted by LDiCesare
    Just letting know I have coded the postpone stuff.
    The mods for the AI etc sound good. What exactly is the postpone stuff? Looking back on the thread I couldn't figure exactly what you meant. I am still without an IDE on my main computer. However I have gotten some updates from Aaron and IIRC others too. I will probably send out a merged version of the code in a week or so, assuming more comes in.

    Cya,

    Mark

  28. #88
    LDiCesare
    Emperor
    Join Date
    03 Jan 2001
    Location
    Ashes
    Posts
    3,215
    Country
    This is LDiCesare's Country Flag
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 23, 2013
    Local Time
    00:53
    Mark, postponing was postponing the terrain test for ports. The biggest problem I face with the ai is that it may eat lots of memory. I am not sure, as it may have been due to the fact that there were many units at that time in the game, and I need a game that lasts many turns to reproduce the problem. I tried with the old ai, but it didn't happen, but at one time I couldn't open the econ windows maybe because of resources shortage?
    Anyway I will be investigating that in my spare time. I must check the number of threads created and duplicate (simulated) units to make sure that they are reclaimed after use. So slow progress, but progress nonetheless.
    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)

  29. #89
    Mark_Everson
    Clash of Civilizations Project Lead Mark_Everson's Avatar
    Join Date
    31 Dec 1969
    Location
    Canton, MI
    Posts
    3,443
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    18:53
    Hi All:

    I have just sent out the merged code with Laurent, Aaron, and Owen's efforts. If you think you should have gotten it and didn't, please let me know.

  30. #90
    vovan
    Emperor vovan's Avatar
    Join Date
    23 Oct 2001
    Posts
    5,725
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Local Date
    May 22, 2013
    Local Time
    16:53
    Thanks, Mark. I will merge what you sent out with what I have done so far, and send you the changes, some time this week-end hopefully.
    XBox Live: VovanSim
    xbox.com (login required)
    Halo 3 Service Record (I fail at FPS...)
    Spore page

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. [C4:AC] CVN Discussions
    By Impaler[WrG] in forum AC Creation
    Replies: 1
    Last Post: January 7, 2007, 13:50
  2. PBEM Discussions
    By Rommel2D in forum Civ3-PBEM-Archive
    Replies: 8
    Last Post: April 14, 2004, 04:17
  3. DG Strategy Discussions
    By Harry Seldon in forum Master of Orion
    Replies: 33
    Last Post: October 15, 2003, 08:17
  4. MSN - Invasion discussions
    By Kody in forum ACDG The Human Hive
    Replies: 0
    Last Post: August 24, 2003, 02:14
  5. discussions with NYE
    By Jon Miller in forum C3PtWDG Vox Controli
    Replies: 13
    Last Post: April 23, 2003, 23:26

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!

Bookmarks

Posting Permissions