Hiding completed buildings on production screen list
Moderator: Oberlus
Hiding completed buildings on production screen list
My apologies if this has been discussed, but I find it annoying to have to mouse over the list of completed buildings on a planet to see if I've built a specific building. If I've built a building, shouldn't it not be displayed in the list of available buildings for that planet? Are there examples where you would want to build more than one example of a building? If so, should the building in the list be color-coded or have a "built quantity" number displayed to indicate this?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Hiding completed buildings on production screen list
Presently there's nothing stopping you from building 800 copies of the same building on a planet.agorski wrote:My apologies if this has been discussed, but I find it annoying to have to mouse over the list of completed buildings on a planet to see if I've built a specific building. If I've built a building, shouldn't it not be displayed in the list of available buildings for that planet? Are there examples where you would want to build more than one example of a building? If so, should the building in the list be color-coded or have a "built quantity" number displayed to indicate this?
Really what we need is for the buildable items list to have another toggle, which sets it to one of two modes:
1) All buildings and ships that your empire can produce (ie. the "available ones") are listed. Double-clicking available buildings or ships that can't be produced on the currently selected planet would do nothing.
2) Only buildings and ships that can be produced on the currently selected planet are listed. The others don't appear.
You'd set the toggle to mode 2. What we'd then need to do is adjust the location conditions of all (or most of) the buildings in the game so that they can't be built on a planet that already has one of those buildings.
Of course, doing that isn't quite so simple, as we'd have to deal with being able to enqueue more than one copy of a building at the same place, as technically if a building is just enqueued at particular location, it doesn't actually exist there yet, so another copy could be enqueued, even if it had a location condition saying it can't be built when there's another one present.
Eventually one of the buildings will finish, and mid-update, checks will need o be done to make sure every building on the queue can still be finished, and hasn't been made invalid by previously-finished buildings on the queue. Otherwise, even if you had a check each *turn* whether a building's location condition has become invalid since it was enqueued, if two of the building were enqueued the same turn, and got the same funding, or just happened to both finish being produced on the same turn, you could still end up with two copies since both were completed before the other was created in the universe.
This also has the potential to make order of empire turn processing important, as if one empire's buildings influenced where another empire's buildings could be produced, the results could depend on the order of stuff being taken of the various empires' queues.
There's also the issue of what to do with buildings or ships on queues that were valid to add when they were added, but which subsequently become invalid or not buildable at the location where they are being built. Do they just disappear from the queue, losing all PP that went towards them, or do they just hang? If the latter, a careful player could leave a nearly-complete backup copy of a certain building that's limited to one per empire, with the second one at a different location, but unable to complete due to the existance of the first. If the first is destroyed, the second immediately becomes a valid building, and can finish the next turn. That's possibly not what we'd want to be happening.
(I'm assuming there will be a variety of building location conditions created, related to resources or other buildings or other interesting factors... Making that possible is mainly why buildings have location conditions... (which determine where they can be built, if that wasn't clear)).
Re: Hiding completed buildings on production screen list
I like the toggling idea on the building tab. I think that would remove almost all of OP's irritation with buildings. I know I'd like to see that feature in FO!
Last edited by Kryxx on Tue Jul 28, 2009 5:29 pm, edited 1 time in total.
Re: Hiding completed buildings on production screen list
This would be easy to solve if it were only a SELECT from LINK (queue) and (planet). Hmm.
-Crissa
-Crissa
Re: Hiding completed buildings on production screen list
Uff, I had similar problem in Zvjezdojedac, but it was more design challenge, implementation was actually simple. Trick is to make multiple passes instead of one. Each colony is processed in two passes and within first pass, each item in building queue is precessed twice. On the other hand, in Zvjezdojedac you can't put same item multiple times in queue. Instead single item can spawn multiple buildings like housing in Master of Orion II (lets say each population unit is one building built by housing) or industry and missile bases in Master of Orion I.Geoff the Medio wrote: Of course, doing that isn't quite so simple, as we'd have to deal with being able to enqueue more than one copy of a building at the same place, as technically if a building is just enqueued at particular location, it doesn't actually exist there yet, so another copy could be enqueued, even if it had a location condition saying it can't be built when there's another one present.
Eventually one of the buildings will finish, and mid-update, checks will need o be done to make sure every building on the queue can still be finished, and hasn't been made invalid by previously-finished buildings on the queue. Otherwise, even if you had a check each *turn* whether a building's location condition has become invalid since it was enqueued, if two of the building were enqueued the same turn, and got the same funding, or just happened to both finish being produced on the same turn, ...
Hmm, that's weird approach. Do I understand correctly, when you process new turn and when buildings are build, you don't add them to colonies as they are built rather they are added after whole processing? If that is so, you can make copy of colony and add buildings as they are built and (presuming building queue is processed sequentially) as you move to next item in list check is it legal using copy of colony, if it's not, skip.Geoff the Medio wrote:... you could still end up with two copies since both were completed before the other was created in the universe.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Hiding completed buildings on production screen list
Deciding whether or what order to create buildings in and how to deal with resulting conflicts with building location conditions isn't a programming problem; it's a game design issue. Making "multiple passes" doesn't resolve the problem.
You ingore the issue of multiple empires producing things on the same turn. Each empire's production queue is independent and (conceptually at least) processed in parallel with the other empires' queues on a given turn. Only on the next turn can any produced buildings affect the location condtions for buildings on another empire's queue.EmP wrote:Do I understand correctly, when you process new turn and when buildings are build, you don't add them to colonies as they are built rather they are added after whole processing?
Dealing with multiple mutually exclusive items on a single empire's production queue isn't a problem; another way to address it is outlined in post you quoted.If that is so, you can make copy of colony and add buildings as they are built and (presuming building queue is processed sequentially) as you move to next item in list check is it legal using copy of colony, if it's not, skip.
Last edited by Geoff the Medio on Sat Jul 03, 2010 11:38 pm, edited 1 time in total.
Reason: fixed quote attribution
Reason: fixed quote attribution
Re: Hiding completed buildings on production screen list
That's the catch, other empires, somehow missed that part . I googled (link) to see how it is done in Civ, when multiple civ complete same wonder in same turn. Someone digged up a guide which states that every turn player order is shuffled and then simply first one to be processed wins the prize. Seams fair if it is one problematic item per turn and its not breaking turn processing pipeline.
I'm not so familiar with FreeOrion design, what are the cases where mutual exclusion is required in FreeOrion? I've read somewhere that you have analogons for Civ's world wonders. Are there more possibilities for mutual exclusion?
I'm not so familiar with FreeOrion design, what are the cases where mutual exclusion is required in FreeOrion? I've read somewhere that you have analogons for Civ's world wonders. Are there more possibilities for mutual exclusion?
Re: Hiding completed buildings on production screen list
No.EmP wrote:...every turn player order is shuffled and then simply first one to be processed wins the prize. Seams fair...
Warning: Antarans in dimensional portal are closer than they appear.
Re: Hiding completed buildings on production screen list
No what?Bigjoe5 wrote:No.EmP wrote:...every turn player order is shuffled and then simply first one to be processed wins the prize. Seams fair...
Also, Geoff, your quote says it's from me, but isn't. I just suggested an SQL solution which wasn't appropriate to the thread, just musing.
I will note, though, that in the build I'm playing the UI is locked for about a second and some per item added to the queue. Seems unintentional, but like I said, I hadn't logged in to read the current list of bugs yet.
-Crissa
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Hiding completed buildings on production screen list
No, it's not a good solution to randomly pick an empire to produce a building when two or more could produce them on a give turn but either producing the building would mean the other shouldn't be able to also produce the same building (or other similar mutual exclusions in production on a given turn).Crissa wrote:No what?Bigjoe5 wrote:No.EmP wrote:...every turn player order is shuffled and then simply first one to be processed wins the prize. Seams fair...
Whoops. Fixed it.Also, Geoff, your quote says it's from me, but isn't.
How long is your build queue when this happens? (Does it matter?)I will note, though, that in the build I'm playing the UI is locked for about a second and some per item added to the queue. Seems unintentional, but like I said, I hadn't logged in to read the current list of bugs yet.
Re: Hiding completed buildings on production screen list
Just following this thread. What's a specific case study for this? Maybe I haven't played the game enough but are there buildings that two empires could build that would make them mutually exclusive to build by the other empire? I didn't think there were civ-like wonders.
The other case though makes sense: don't build duplicate buildings in the same location. But that seems like ui/queue logic. If it's in the queue don't add. Else allow the user to add to the queue. That or don't display buildings that can't be built there (or are already built) in the menu in the first place. Or more properly phrased, only display available buildings for the user to choose to build. The civ-iPad app is awesome about this.
The other case though makes sense: don't build duplicate buildings in the same location. But that seems like ui/queue logic. If it's in the queue don't add. Else allow the user to add to the queue. That or don't display buildings that can't be built there (or are already built) in the menu in the first place. Or more properly phrased, only display available buildings for the user to choose to build. The civ-iPad app is awesome about this.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Hiding completed buildings on production screen list
There aren't any now, partly because the issues in this thread would make handing such buidings difficult.neuro wrote:...are there buildings that two empires could build that would make them mutually exclusive to build by the other empire? I didn't think there were civ-like wonders.
The location conditions for buidlings - which determine if a particular planet is a valid place to put a building - can be arbitrarily complex, and can include things such as the number of building X (which may or may not be the building being considered for this location) in the universe or within some distance or controlled by a particular empire, etc. As such, there could be a building that has a limit of (for example) 5 (or 1) in the whole universe.
There's no general rule that a particular building can only be built once per location. (If we want a particular building to have that limitation, it should have a location condition that excludes planets that already have the building.) In many cases it's probably a good rule, but I prefer to have the reason to not build two of a building at a particular location inn most cases be the nature of the building's effects and resulting lack of a strategic reason to duplicate, rather than a game-enforced restriction.The other case though makes sense: don't build duplicate buildings in the same location. But that seems like ui/queue logic. If it's in the queue don't add. Else allow the user to add to the queue. That or don't display buildings that can't be built there (or are already built) in the menu in the first place. Or more properly phrased, only display available buildings for the user to choose to build. The civ-iPad app is awesome about this.
Re: Hiding completed buildings on production screen list
Ah, je comprend. Hence the UI recommendation instead of the logic/coding rule. Some time in the future it might make sense to have multiple builds of a building (ie housing in moo2), so why restrict it and leave it to players discretion in a laissez-faire model.
But for arguments of game playability, this benefits advanced players and not new ones. It's hard for a new user to understand that this specific building would give no benefit whatsoever to multiple instances at said location as some buildings might (as opposed to say seeing it in two queues : an available to build queue and an all buildings queue). I guess then I'd propose that the spec of a building object include an enumerated property to set if it's allowed for multiple instances (ie housing?), unique per location (ie research facility), unique per player (ie imperial Capitol - every player has one and only one seat of power), or unique per game (ie galactic hanging gardens or somesuch civ-like one instance allowed wonder).
That way you can filter the build view to only display available buildings to add to queue that either haven't been built OR allow multiple builds.
New buildings in game design would have to specify one of these four uniqueness enumerated properties. It might even make metrics easier to graph (ie show statistics of players with most buildings, filter / break up bars by multiple, location unique, player unique, or game unique/wonders).
Just a thought.
You're right the rules could get arbitrarily complex (like that distance property if a building is allowed for build). But that's not necessarily a reason not to attempt to account for it.
But for arguments of game playability, this benefits advanced players and not new ones. It's hard for a new user to understand that this specific building would give no benefit whatsoever to multiple instances at said location as some buildings might (as opposed to say seeing it in two queues : an available to build queue and an all buildings queue). I guess then I'd propose that the spec of a building object include an enumerated property to set if it's allowed for multiple instances (ie housing?), unique per location (ie research facility), unique per player (ie imperial Capitol - every player has one and only one seat of power), or unique per game (ie galactic hanging gardens or somesuch civ-like one instance allowed wonder).
That way you can filter the build view to only display available buildings to add to queue that either haven't been built OR allow multiple builds.
New buildings in game design would have to specify one of these four uniqueness enumerated properties. It might even make metrics easier to graph (ie show statistics of players with most buildings, filter / break up bars by multiple, location unique, player unique, or game unique/wonders).
Just a thought.
You're right the rules could get arbitrarily complex (like that distance property if a building is allowed for build). But that's not necessarily a reason not to attempt to account for it.
Re: Hiding completed buildings on production screen list
It is a solution, though.Geoff the Medio wrote:it's not a good solution to randomly pick an empire to produce a building when two or more could produce them
I do think randomized turn order is a good idea in principle.
I don't think it matters. It's only noticeable if I click many times because I can click far faster than it is adding them to the queue. It really shouldn't lock the UI to play the sound the number of times I've clicked, nor should it pause the UI to play the sound. It may be that adding to the queue really does take that long, but there should be some truncation there somehow.How long is your build queue when this happens? (Does it matter?)
I just fear the response if the cat sits on the enter button or something how long I might have to wait to get control of my computer back.
-Crissa
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Hiding completed buildings on production screen list
Ideally, turn order shouldn't matter, and for most purposes, there is no "turn order" for players: All ship movement happens simultaneously for all players, all combat happens sort-of simultaneously (or at least the only thing that's happening at the time is combat, and one system's combat doesn't interact with another systems), all production and research happens simultaneously with determination of what is produced happening before the actual objects are created, etc.Crissa wrote:I do think randomized turn order is a good idea in principle.
Playing sounds doesn't hang the UI, unless you get hangs when opening the FleetWnd (which has a fairly long open sound).I don't think it matters. It's only noticeable if I click many times because I can click far faster than it is adding them to the queue. It really shouldn't lock the UI to play the sound the number of times I've clicked, nor should it pause the UI to play the sound.How long is your build queue when this happens? (Does it matter?)
Depending where it's getting hung up, there is a limit to how long it will sit recalculating the build queue (up to 500 turns simulation of estimated build times). If your delay doesn't depend on whether you have one or two or one or two hundred items on the queue, then it's probably not related to simulating the build queue for many turns, as the time to do that should depend at least somewhat on the number of items on the queue, unless every item is going to take over 500 turns to complete.It may be that adding to the queue really does take that long, but there should be some truncation there somehow.
Does it matter how big your empire is or how many systems are visible?
I've heard reports of slowness when changing planet focus, but not about the build queue that I recall.
Does the research queue have similar issues?