Announcement

Collapse
No announcement yet.

Bug Fix Discussions

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

  • Bug Fix Discussions

    It seemed to me we could use a thread for discussing bugs that were in the process of being fixed. It has two primary purposes:

    1) let the coders keep track of who is working on what so there isn't duplication of effort. Coders attacking a bug or small feature request should "sign it out" here. We will retain the numbering in the Bugs and features lists, which are the second and third posts in the Demo 7 Download and Comments thread.

    2) Let others know about any proposed changes to program function, so that they can contribute to the discussion on how things should be changed. If the bug is really specific to one particular model, that should probably take place in the model thread. If you're feeling Really nice you could put a link to the post where the discussion starts in that thread. (I'm not sure I'm that nice ) Only miscellaneous bug discussions should go here.

    Thanks for your forebearance in doing things this way. I know its a pain, but I think we'll get a better final product with everyone able to look in on the deliberations.

    -Mark
    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!

  • #2
    HI

    I'm new here, Mark mailed me the source last night(or rather the early hours where I am). And suggested I start off by looking at Bug Fixing as a good way of getting used to the code.

    I looked at 2 bugs straight away. I didn't see any notes that other people were working on them, apologies if they were.

    The road cancelling bug, fixed by right clicking to remove the last tile, also stopped the right click bringing up the change province capital menu at the same time.

    A bug in TaskForce menu -> details popup was really annoying me, the summary details that appears above the unit list was resizing depending on the size of the list, and this caused all the text to merge into a mess at the top of the popup. I've mailed a fix to this to mark, essentially the summary details now never resize, it takes up just enough room s it requies, the list of units sits in a ScrollPane (which will only appear if it has to), this also means resizing the popup to see long lists of units is not needed anymore.

    As I am new here, I assume mark will check these over before accepting them.

    Comment


    • #3
      Hi Lee, welcome to the Clash forum! Thanks for the bug fixes. Its a really good sign when someone shows up and jumps right into work!

      The fixes will probably go into a bug fix release (7.2.1) I'll put out at the end of the weekend or so. Looking forward to more .

      Thanks again,

      Mark
      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


      • #4
        oops - the road fix is not quite right, right clicking to remove the last segment is ok if you just layed a road. But if there are multiple roads already planned, then going into road building mode on one of those
        roads and right clicking may remove the last segment from another road - if that was the last road layed. (ie I cannot lay a road , then a second road, then go back to thefirst and start removing that)

        I'm look into fixing that, so that you can select a road and start removing road segments from that road.

        I almost have it working, howver the list of road build orders stores a list of objects which know the which 2 squares it connects, but not which road they actualy belong to (as far as i can tell so far) This means my idea works ok so long as multiple roads do not cross as I can work out from a selected road square which is the final destination square, but if 2 roads do cross then there appears to be no way of finding which is the road that the previous road square belonged to at the crossroads. A side effect will be that right clicking on a square without a road order will have no effect - the right click will have to be somewhere along the road to remove the last segment.

        Another possible solution is to simply remove all roads in a square that was clicked on, rather than the last square for that road. This would mean you could remove the middle of a road leaving the rest intact either side of the square clicked on.





        I was also going to look at 155, road costs accumulating over a distance.

        Comment


        • #5
          Hi Lee, good stuff!

          While you're on it a "delete all" command would be good. I can see cases where I've conquered a province, and ordered a road network. Then the huns charge over the hill and its not my province anymore. But maybe this is so rare that just making people use the delete-segment is fine.

          Another possible solution is to simply remove all roads in a square that was clicked on, rather than the last square for that road. This would mean you could remove the middle of a road leaving the rest intact either side of the square clicked on.
          This one seems most straightforward to me.

          I was also going to look at 155, road costs accumulating over a distance.
          Yeah this is a good one to look into. It is I think the source of why roads are frequently built in big clumps also, though I could be wrong on this one. It seems to me offhand that the simplest fix is to take the roadbuilding path when it is entered and make it into a series of one-space-move paths. This will also facilitate numbering build turns on the road order segments, which has been requested, though isn't of really high priority.
          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
            So let it be written, so let it be done, if you so want, That is very easy to achieve - do i take it that you wish right click to remove ALL road orders (ie both sections at a crossroads) in the clicked square, and not the last segment.


            I can see the road cost bug, but the problem is in a private part of a base class, so I'll have to look at it a bit harder else other things which go through this section may suddenly get cheaper - or has anyone noticed any other pathing costs more expensive than they should be.

            Comment


            • #7
              Originally posted by LFS
              do i take it that you wish right click to remove ALL road orders (ie both sections at a crossroads) in the clicked square, and not the last segment.
              Yep, seems simplest to me. In the rare case of a crossroads the player can just order the one they want to remain as a new build.

              One issue though. The standard we have been using is that left-click doesn't select a square, but rather pops up a menu for choices that act on a previously selected square. In road mode that doesn't work well since selecting a square also would lay down a new road path. But I just wanted to make it clear we're going against the existing standard. Seems we need to discuss the standard in a dedicated thread at some point and come up with a unified approach.

              I can see the road cost bug, but the problem is in a private part of a base class, so I'll have to look at it a bit harder else other things which go through this section may suddenly get cheaper - or has anyone noticed any other pathing costs more expensive than they should be.
              Yeah, I think that is why I gave up on it when I found it. Could be Really messy. I think if you take the order before its entered into the road build queue and break it into a set of single-square paths using a completely new function would be safest with regards to potentially breaking things.
              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


              • #8
                OK, I'll try to take on this bug:

                When I click "Next" in the Events window that pops up, it just disappears. I don't think it's supposed to do that. (there may be problems with previous also)
                (Twinge) I'll go into a little more detail to clarify: When the events window pops up at the begging of the turn, you can hit previous to check the previous turn's events. If you press Next to go back to the current events, the box disappears.
                After a certain amount of testing, there seems to be much more to it than what was described. The window seems to always jump back to the default position, after each turn. That doesn't make much sense. I will try to make it so that the window stays in the same place every turn, and see what I can make of it.

                EDIT: OK, I see now what the problem might be: It is probably that for each turn, a new frame is generated. In general, the events frame seems a little buggy. Sometimes it seems to skip a turn. So, for instance, it would have turns 7, 8, 10, 11, 12, in its list. And sometimes, it doesn't appear at all. I think that the thing might need to be reworked completely. It really needs to be much like any other frame - the contents should be updated, but the frame itself should stay the same. After all, when we select a different unit, we don't create a new frame just for it. So we shouldn't for events, I think. But since it would require a complete rework, I am not sure I should be the one to do it. What do the rest of you think? Laurent, Mark, Gary? Would any of you like to work on that, or should I deal with it?
                Last edited by vovan; January 11, 2003, 14:49.
                XBox Live: VovanSim
                xbox.com (login required)
                Halo 3 Service Record (I fail at FPS...)
                Spore page

                Comment


                • #9
                  Road cost bug.

                  The path AI is calculauting the path to take by building up a series of nodes, each is given a cost that includes the cost of the previous node. This means that the last node represents the cost of the whole path, however it does not represent the cost of that node from the previous node.

                  I also note that the time property for path is the same as the cost.

                  Further to that there is a total property, which is cost + heuristic (what is this for)

                  On converting a path/nodes to a movementList the nodes costs are passed straight into the move segments - so they then suffer from the same problem - i.e they don't know their own cost.

                  As this pathing AI is generic, we need well defined properties and their uses. The unit and road stuff are currently at odds as to what they expect methods like getCost() to be.

                  I propose to make the cost of the movement segment be it's own individual cost. The Pathing/MovementList classes are where calculating the whole-path cost should be, rather than a Move segment class. Where a path is rendered it is for the renderering operation to accumulte totals IF that is what is wanted (maybe using a utility method on a Pathing/Movement object).

                  I seem to have a fix along this line for the road problem, and have amended the unit path renderering to cope, but I can't be to sure how good it is yet (i.e impact on other areas if any), I'll mail mark the code.

                  The fix

                  Comment


                  • #10
                    Lee:

                    Cost + heuristic is used by the A* pathfinding algorithm.

                    You can probably keep the same class for both path types, but have two methods instead of getCost:
                    getMovementCost which is used in pathfinding in order to go from the current to the final square, and a getUnitaryCost to give the cost form one square to the next?
                    I didn't check the code recently, so that may not be possible.

                    Vovan:
                    You can make a frame for the events. I don't feel comfortable coding UI anyway.
                    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


                    • #11
                      Hi All! I'm wrestling with the collection of bugs that showed up in Attila while we were putting in new features. Just don't anyone mess with the attila.xml file. I think all the other issues are in the econ code.

                      Originally posted by vovansim
                      OK, I see now what the problem might be: It is probably that for each turn, a new frame is generated. In general, the events frame seems a little buggy. Sometimes it seems to skip a turn. So, for instance, it would have turns 7, 8, 10, 11, 12, in its list. And sometimes, it doesn't appear at all. I think that the thing might need to be reworked completely. It really needs to be much like any other frame - the contents should be updated, but the frame itself should stay the same. After all, when we select a different unit, we don't create a new frame just for it. So we shouldn't for events, I think. But since it would require a complete rework, I am not sure I should be the one to do it. What do the rest of you think? Laurent, Mark, Gary? Would any of you like to work on that, or should I deal with it?
                      I agree with you that there should probably only be one. But given the work involved I'm not sure its worth doing now. I sure don't want to do it If all it does is change position if you move it but otherwise works ok, I would leave it for now. If you can figure why it skips turns, and make sure the next and previous work ok, I'd be happy with that. OTOH it seems Laurent is cool with it, so I guess its up to you.
                      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


                      • #12
                        Originally posted by LFS
                        Road cost bug.

                        I propose to make the cost of the movement segment be it's own individual cost. The Pathing/MovementList classes are where calculating the whole-path cost should be, rather than a Move segment class. Where a path is rendered it is for the renderering operation to accumulte totals IF that is what is wanted (maybe using a utility method on a Pathing/Movement object).

                        I seem to have a fix along this line for the road problem, and have amended the unit path renderering to cope, but I can't be to sure how good it is yet (i.e impact on other areas if any), I'll mail mark the code.
                        Hey Lee:

                        I haven't looked at your fix yet, and it'll probably be several hours yet due to my own code issues and other RL stuff. But Laurent's approach sounds best to me in that it'd be the least likely to cause a whole bunch of obscure bugs. If you want to go ahead with what you've done already I suggest you test the pathfinding and movement in a bunch of games vs the 7.2 release. If things look the same then we can at least hope your fix isn't causing other problems.

                        [edit - add]
                        While you're up to your elbows in roads how about this one? My proposed solution is on the last line of the feature request description below. Maybe a 2-turn delay if road is in a populated square of your civ, and a 4-turn delay if its outside your civ? What do people think?

                        F151 (Laurent) road-building is pretty fast for me (again, I always put LOTS of kapital in it but even then, 12 squares including 2 hills and a mountain in one turn, it seems a lot).
                        Mark said: But part of the reason its so fast at 30% road building and above is that 30% is an Enormous amount of resources to put in roads.
                        What real 'civ' spends more than a few percent of revenues on road-building? There are so many other competing demands...
                        Laurent said: Yes, but in the game, which is not a simulation, it seems weird. There are so many things the player doesn't see, that roads, which are something he sees (and not in a lost menu but on the map), should have more importance than in real-life.
                        Anyway, players need feedback on how much money to put in the road-building (so I don't put 30% where 5% is needed), and they can stage it over several turns.
                        My suggestion, maybe put in an arbitrary delay for road building so it happens over time. This would also prevent flash-building of roads during an invasion. Maybe an automatic 2-turn delay between order and building? [low D7.1]
                        Last edited by Mark_Everson; January 11, 2003, 17:04.
                        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


                        • #13
                          Originally posted by Mark_Everson
                          But given the work involved I'm not sure its worth doing now. I sure don't want to do it <snip> OTOH it seems Laurent is cool with it, so I guess its up to you.
                          Heh, quite frankly, I don't really want to deal with this right now either. I suppose there are much more serious bugs to play around with. Okay, then we will leave this one till later.
                          XBox Live: VovanSim
                          xbox.com (login required)
                          Halo 3 Service Record (I fail at FPS...)
                          Spore page

                          Comment


                          • #14
                            I find the concept of building roads outside of your control to be pretty wacky. I can't really think of any real civilsations that just plonked down proper roads beyond their control - where does the labor come from.

                            Even the biggest fans of roads in the history - the romans - conquered (or acquired) territories they built their roads in - One of the reasons the germanic areas were late in getting roads compared to the rest of europe.

                            my personal 2p worth is I see no problem with crsh road building courses in you land (the romans did it) but NO road buildng outside your control.


                            Regarding the road cost bug, I have played around with the fix and have not seen a problem (but their may be one), I agree with the other post, their shouldbe more work (maybe more methods) to seperate the 2 concepts of cost - but that is fair a bit more work.

                            Comment


                            • #15
                              I find the concept of building roads outside of your control to be pretty wacky.
                              Yes it is. The question is how: Do you prevent it from the UI or in the building?
                              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

                              Working...
                              X