 |
|  |
 |
|
LFS
|
|
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.
|
|
|  |
 |
|  |
 |
|
LFS
|
|
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.
|
|
|  |
 |
|
LFS
|
|
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.
|
|
|  |
 |
|
vovan
|
|
OK, I'll try to take on this bug:
quote:
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 on 11-01-2003 at 23:49
|
|
|  |
 |
|
LFS
|
|
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
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:25
|
|
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.
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:25
|
|
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.
quote: 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.
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:25
|
|
quote: 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?
quote: 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 on 12-01-2003 at 02:04
|
|
|  |
 |
|
LFS
|
|
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.
|
|
|  |
 |
|
LDiCesare
|
|
La Ferté sous Jouarre France
Jan 2001 time: 05:25
|
|
quote: 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?
|
|
|  |
 |
|
LFS
|
|
both maybe. building certainly - you may lay road, then lose control of the area, so the building logic would have to prevent it.
I suppose you could plan road beyond your control, expecting to take control by the time it is built. so maybe the UI allows the order, but only the building logic prevents building beyond your control, would it then remove the order or leave and retry ?
|
|
|  |
 |
|
LFS
|
|
quote: It will Eventually be done some other way, like with an engineer unit |
wayhay - figured out the quote bit.
Engineer units building roads seems like far more micromangement than a few mouse clicks. Also early roads were not built by engineers on the whole, but forced labor(or similar) or army units.
quote: thousands of km in a month? It is as a play balance point. Otherwise you can flash-build a road in a turn with a big economy and move very far. |
If you have a big economy and nothing else to spend money on then i see no problem. the play balance could be dealt with other ways - e.g class of road (early packed dirt, stone , asphalt etc) or upkeep - roads do require upkeep (to darn much judging by the amount of road works I see on the way to work) - or limiting how many per turn based on some econ factor ( representing how much labor is available for public projects, after all the 'tax' income represents income that may not be in form condusive to large scale labor projects - artisans generate cash tax, farmers pay in food for army, etc - having piles of money doesn't build a road in itself)
Thinking about it that last point was something I liked about CalltoPower - there was a certain amount of 'labor' that accumlated and that you parcelled out on labor type projects, no building engineers, moving them half way across the empire then taking a few centuries to link 2 cities !!), as long as you had sufficient 'labor' you just placed the roads/forts etc where you wanted.
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:25
|
|
quote: Originally posted by LFS
Engineer units building roads seems like far more micromangement than a few mouse clicks. Also early roads were not built by engineers on the whole, but forced labor(or similar) or army units. |
Populating deserts and high mountains just to have a road? But anyway we could go back and forth for quite some time with issues like these. . .
quote: If you have a big economy and nothing else to spend money on then i see no problem. |
The military time scale, which I think should be used for road building, for a turn is one month. I see big problems At least the best we've been able to do in terms of realism vs playability is to have a separate time scale for military and movement issues, and a different one for the other parts of the game. So one turn of game corresponds to one month of military stuff and a variable amount of other activity. There is a thread on it back a ways. Of course we're open to a better way to handle it, but its the best we've come up with so far. Its discussed in a thread called Time Scales and other places that are linked to in that thread.
quote: after all the 'tax' income represents income that may not be in form condusive to large scale labor projects - artisans generate cash tax, farmers pay in food for army, etc - having piles of money doesn't build a road in itself) |
Actually money doesn't build road points, its done with the relevant sectors of the economy. But at least for now we allow that labor and goods to be magically teleported to build the road anywhere we want just to keep things manageable in game terms.
quote: Thinking about it that last point was something I liked about CalltoPower - there was a certain amount of 'labor' that accumlated and that you parcelled out on labor type projects, no building engineers, moving them half way across the empire then taking a few centuries to link 2 cities !!), as long as you had sufficient 'labor' you just placed the roads/forts etc where you wanted. |
That's the way it works in Clash. We are just talking about how its done Outside the ordinary bounds of the civ. For now we are just using the kludge that the inside-civ way can be used outside. Anyway, sounds like we need to discuss this someplace in a dedicated fashion or just put it aside for now. I personally don't think its a critical issue for for now. But if you want, Lee, we can find where the old road discussions are (so we can look over what's already been said, and don't repeat it) and start it up again.
My problem is its too easy for me to get sucked into design issues when I should be coding. 
|
|
|  |
 |
|
LFS
|
|
I'm not going to try and alter something that has gone through a couple of years of discussion.
Are there any other bugs/urgent features that you want looking at, or shall I just get on with the road building delay?
|
|
|  |
 |
|
Mark_Everson
|
 |
Canton, MI
Jan 1970 time: 00:25
|
|
I've got Atilla saved from the econ bugs it was getting shut down by. I'll send the code around along with everyone else's fixes after I test it a bit.
Hey Lee:
quote: Originally posted by LFS
I'm not going to try and alter something that has gone through a couple of years of discussion. |
This stuff hasn't all been discussed to death, just here and there over a period of time. So its by no means chiseled in stone. I'm sure we can find a good way to handle it, and it most likely won't be exactly either of our current positions. But its not urgent, so I'm happy leaving it for somewhere around Demo 10.
quote: Are there any other bugs/urgent features that you want looking at, or shall I just get on with the road building delay? |
Given you don't believe in the importance of the delay, unless we get strong support on it, I'd say its time to move on. If you'd thought it was a good idea too, then it probably would have been worth trying out. One thing that would be good is prohibiting road-building orders in the black. If that is easy to do I'd go ahead with that, and then move on to something else.
I'd say give a look to the bug and features lists and see what catches your interest. I have put priorities on them, so it'd be best to look at the higher-priority things. And let me know when you get sick of bug fixes and small features, and want to move onto something more concentrated.
Thanks for all the hard work!

|
|
|  |
 |
|
LFS
|
|
I've just fixed a vouple of things that were annoying me with the change province dialog.
1) in move mode right clicking to remove a road segment does not also bring up the province capital menu.
2) The change province popup now disappears properly if you click outside it (no more popups piling up behind the Window !
if either of these are undesirable (no1 maybe ? ) let me know
|
|
|  |
 |
|
vovan
|
|
quote: Originally posted by Mark_Everson
I am especially concerned because I have a new Win XP comp coming in about a week from now, and as I understand it the two OS's are quite similar.
|
Mark,
I think it must be something specific about that person's computer. I am running the game on my WinXP laptop, and it works without any of the stuff described in the report. Though my version is XP Home, so I don't know if making it XP Pro would make any difference, but I wouldn't think it should matter. Like I said, it must be something about his computer. Maybe an old version of the JVM?
|
|
|  |
All times are GMT. The time now is 05:25. Apolyton Time is 00:25. |
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
|
|
|
|
|
|