Hiding completed buildings on production screen list

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
User avatar
agorski
Krill Swarm
Posts: 12
Joined: Wed May 27, 2009 7:46 pm

Hiding completed buildings on production screen list

#1 Post by agorski »

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?

User avatar
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

#2 Post by Geoff the Medio »

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?
Presently there's nothing stopping you from building 800 copies of the same building on a planet.

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)).

User avatar
Kryxx
Space Floater
Posts: 22
Joined: Tue Jul 14, 2009 3:48 am

Re: Hiding completed buildings on production screen list

#3 Post by Kryxx »

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.

Crissa
Space Floater
Posts: 29
Joined: Wed Jun 30, 2010 5:17 am

Re: Hiding completed buildings on production screen list

#4 Post by Crissa »

This would be easy to solve if it were only a SELECT from LINK (queue) and (planet). Hmm.

-Crissa

User avatar
EmP
Space Floater
Posts: 22
Joined: Thu Jun 10, 2010 8:20 am
Location: Croatia

Re: Hiding completed buildings on production screen list

#5 Post by EmP »

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, ...
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:... you could still end up with two copies since both were completed before the other was created in the universe.
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.

User avatar
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

#6 Post by Geoff the Medio »

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.
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?
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.
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.
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.
Last edited by Geoff the Medio on Sat Jul 03, 2010 11:38 pm, edited 1 time in total.
Reason: fixed quote attribution

User avatar
EmP
Space Floater
Posts: 22
Joined: Thu Jun 10, 2010 8:20 am
Location: Croatia

Re: Hiding completed buildings on production screen list

#7 Post by EmP »

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?

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Hiding completed buildings on production screen list

#8 Post by Bigjoe5 »

EmP wrote:...every turn player order is shuffled and then simply first one to be processed wins the prize. Seams fair...
No.
Warning: Antarans in dimensional portal are closer than they appear.

Crissa
Space Floater
Posts: 29
Joined: Wed Jun 30, 2010 5:17 am

Re: Hiding completed buildings on production screen list

#9 Post by Crissa »

Bigjoe5 wrote:
EmP wrote:...every turn player order is shuffled and then simply first one to be processed wins the prize. Seams fair...
No.
No what?

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

User avatar
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

#10 Post by Geoff the Medio »

Crissa wrote:
Bigjoe5 wrote:
EmP wrote:...every turn player order is shuffled and then simply first one to be processed wins the prize. Seams fair...
No.
No what?
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).
Also, Geoff, your quote says it's from me, but isn't.
Whoops. Fixed it.
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.
How long is your build queue when this happens? (Does it matter?)

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: Hiding completed buildings on production screen list

#11 Post by neuro »

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.

User avatar
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

#12 Post by Geoff the Medio »

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.
There aren't any now, partly because the issues in this thread would make handing such buidings difficult.

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.
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.
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.

neuro
Space Squid
Posts: 74
Joined: Sun Mar 07, 2010 10:17 pm

Re: Hiding completed buildings on production screen list

#13 Post by neuro »

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.

Crissa
Space Floater
Posts: 29
Joined: Wed Jun 30, 2010 5:17 am

Re: Hiding completed buildings on production screen list

#14 Post by Crissa »

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
It is a solution, though.

I do think randomized turn order is a good idea in principle.
How long is your build queue when this happens? (Does it matter?)
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.

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

User avatar
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

#15 Post by Geoff the Medio »

Crissa wrote:I do think randomized turn order is a good idea in principle.
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.
How long is your build queue when this happens? (Does it matter?)
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.
Playing sounds doesn't hang the UI, unless you get hangs when opening the FleetWnd (which has a fairly long open sound).
It may be that adding to the queue really does take that long, but there should be some truncation there somehow.
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.

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?

Post Reply