Pinning windows

Everything about development and the OpenMW source code.
dteviot
Posts: 144
Joined: 17 Dec 2014, 20:29

Pinning windows

Post by dteviot »

We've got a couple of bugs related to windows not updating when pinned to GUI.
#2411 and #2424

I'm wondering if anyone can tell me what's the point of pinning the Inventory and Spells Windows.
#2411 suggests its so you can see the number of charges remaining in the enchanted object you're using.
My questions are: is there any other reason for doing this, and if this is the reason, would having an enchantement bar (similar to the health and magicka bars) be more use, as it would take up far less screen space.

Thanks.
User avatar
Okulo
Posts: 672
Joined: 05 Feb 2012, 16:11

Re: Pinning windows

Post by Okulo »

A larger on-screen map, for one. I would sometimes pin the map to get a general idea of where I was.
Cramal
Posts: 186
Joined: 19 Sep 2014, 13:37

Re: Pinning windows

Post by Cramal »

On large screens it is interesting to pin windows to have access to more informations :
- the map : large view around , wolrd view of the map when you are for exemple going by foot from one twon to another
- the inventory : to see how much consummable you have (scrolls, lockpicks, potions...)
- the magicka : monitoring the charge left in your enchanted items
- the status : to have value of health and magicka (allow to manage more precisely use of potions and/or teleport to safe places)

When the screen is large you can have 1 or 2 windows pinned on the corner of your screen and still see enough of the landscape to play

Personnaly i use a lot the map, but sometimes i use the other ones also
dteviot
Posts: 144
Joined: 17 Dec 2014, 20:29

Re: Pinning windows

Post by dteviot »

First off, let me say thank you for your input, it is appreciated.
Also, I'd appreciate feedback from anyone else who could answer my questions below.
Please note, I'm NOT suggesting we eliminate pinning the windows.
The situation is more, not all the pinned windows update in real time. And changing them so that they can be updated efficiently in real time may be significant work.
Such that, a better solution may be to spend the time providing a better way of solving the problem that the pinned windows are intended to solve.
But to do that, I need to fully understand the problem. The only window I've found useful to pin was the Map.
Cramal wrote:to have value of health and magicka (allow to manage more precisely use of potions and/or teleport to safe places)
OK, so you're talking about the "Attributes" window here.
If I understand you correctly, your need could be satisfied by adding the numeric value for health and magicka to the health and magicka bars that are shown on the GUI?
And should the numbers show current value, or current value and maximum?
Is there anything else you would require that would eliminate/reduce the need to pin this window?

A more open question: what could I do on the GUI that would eliminate the need to pin the attributes window?
Cramal wrote:the magicka : monitoring the charge left in your enchanted items
Is this for the currently selected item, or all items?
As with health and magicka, would adding a bar to the GUI to display this, along with the numeric value(s) eliminate the need for pinning the spells window?

A more open question: what could I do on the GUI that would eliminate the need to pin the spells window?

Cramal wrote:the inventory : to see how much consumable you have (scrolls, lockpicks, potions...)
Can you provide me with more details on when/how/why you do this?
Do you want to see all consumables at all times?
What potions do you want to know about? When? At what level of detail? For what purpose?
What scrolls do you want to know about? When? At what level of detail? For what purpose?

Would it be helpful to display the number of lockpicks available when a lockpick is selected? Should it be total lockpicks? Count of the selected type? Or perhaps two numbers, count of this type of lockpick, and count of all lockpicks. Or counts for all types of lockpicks?

Would you want similar behaviour for probes?


A more open question: what could I do on the GUI that would eliminate the need to pin the inventory window?
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Pinning windows

Post by Zini »

The situation is rather simple. MW had window pinning. Therefore OpenMW also must have window pinning. We can ofter optional alternatives, but the pinning can not be removed.
dteviot
Posts: 144
Joined: 17 Dec 2014, 20:29

Re: Pinning windows

Post by dteviot »

@Zini
Zini wrote:The situation is rather simple. MW had window pinning. Therefore OpenMW also must have window pinning. We can ofter optional alternatives, but the pinning can not be removed.
I think I was not clear.
I was NOT suggesting that pinning of windows be removed.
The Map, Attributes, Inventory and Spells windows can already be pinned.
The problem is that when pinned, the Inventory and Spells windows are not updated.
(The Map window IS updated, and I don't know what the Attributes window does.)

For the spells window, the simple fix of simply updating the spell window each frame is not practical, it has too large a performance impact. See my comments on #2411 for details.
Scrawl has suggested that modifying the update to be more efficient and not updating the window every frame.

Note, even if the update could be improved to take zero time, having the spell window pinned still results in a lowered frame rate. (And consumes screen space.)

Only updating the spells window once per second (or even every 2 seconds) looks to be simple to implement and hopefully reduce the performance impact to an acceptable level.
Modifying the update to be more efficient looks, on first glance, to be considerably more time consuming.

Therefore, my thought was first do the "update once every 2 seconds" code. Which would allow the spell window to update, with hopefully acceptable FPS loss.
Then, instead of improving the update logic for the spell window, updating the GUI so that need to pinning the Spell window is no longer present (assuming the work is not large) may be a better use of my time. PInning the window can still be available for those who want to do it.

Note, I don't know if the Inventory window has a similar problem with update performance. (But I suspect it does, as it shows the same "No per frame update" behaviour.)
I intend to investigate.

I also don't know if the Attributes window has a problem. Again, I will investigate.
Cramal
Posts: 186
Joined: 19 Sep 2014, 13:37

Re: Pinning windows

Post by Cramal »

dteviot wrote: The Map, Attributes, Inventory and Spells windows can already be pinned.
The problem is that when pinned, the Inventory and Spells windows are not updated.
(The Map window IS updated, and I don't know what the Attributes window does.)

For the spells window, the simple fix of simply updating the spell window each frame is not practical, it has too large a performance impact.
I think that as long as the inventory and spells windows are rarely pinned, the loss of FPS may perhaps be acceptable.
But a "not so often" update may also be resonnable.

But i speak for my self and i cannot give generic answer
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Pinning windows

Post by Zini »

Only updating the spells window once per second (or even every 2 seconds) looks to be simple to implement and hopefully reduce the performance impact to an acceptable level.
Modifying the update to be more efficient looks, on first glance, to be considerably more time consuming.

Therefore, my thought was first do the "update once every 2 seconds" code. Which would allow the spell window to update, with hopefully acceptable FPS loss.
Makes sense.
Then, instead of improving the update logic for the spell window, updating the GUI so that need to pinning the Spell window is no longer present (assuming the work is not large) may be a better use of my time. PInning the window can still be available for those who want to do it.
That would be a post 1.0 task. And I am not in favour of it. Having a second feature that covers the same use-cases as the first one will increase the complexity of the UI in an unnecessary way. Furthermore if we get the FPS loss to an acceptable level with your proposed improvements, then I do not see the need for further actions on this issue.

Regarding post 1.0 development: I don't have any concrete plans myself concerning the GUI. By in general I think we should put more focus on window pinning, not less. It is flexible and elegant and IMHO one of the best ideas for dealing with GUI heavy interfaces that I have seen in any game.
dteviot
Posts: 144
Joined: 17 Dec 2014, 20:29

Re: Pinning windows

Post by dteviot »

Zini wrote:That would be a post 1.0 task. And I am not in favour of it. Having a second feature that covers the same use-cases as the first one will increase the complexity of the UI in an unnecessary way.
Possibly. It's a trade off between increasing the complexity of the GUI code, and increasing the complexity of the update logic for each pinned window.
It may also improve the experience for the user.
For example, I'm starting to suspect that the reason for pinning the Attributes window is so that a player can see exactly how much Health and Magicka remain when the value is getting low. This could be accommodated on the UI by displaying the numeric values for Health and Magicka beside their respective bars. (Which is done by MANY games.)
This means a user would no longer need to resize the Attributes window to the GUI, and then need to resize it every time they want to see something other than health and magicka, then turn it back to the minaturized size when they are done.
Zini wrote:Furthermore if we get the FPS loss to an acceptable level with your proposed improvements, then I do not see the need for further actions on this issue.
As I point out above, some simple GUI changes, if they are SMALL and SIMPLE, may result in an improved user experience. Basically, the player needs to to less work, or things are more intuitive/obvious.

But to do this, I need to know WHY people are pinning the windows.
Zini wrote:Regarding post 1.0 development: I don't have any concrete plans myself concerning the GUI. By in general I think we should put more focus on window pinning, not less.
And if we to do this, it would be very helpful to know
  • WHY people are pinning the windows
  • How they are using pinning.
  • Any pain points experienced with pinning windows. (I suspect that having to constantly re-size them, depending on what one is trying to do with them is the major pain point.)
  • Any suggestions on how to fix the pain point. (Perhaps A way to toggle a pinned window between small size and full screen? Or is this already possible?)
User avatar
sjek
Posts: 442
Joined: 22 Nov 2014, 10:51

Re: Pinning windows

Post by sjek »

what have used the window spinning has been handy testing training mods and other workings. for example see if the level raising script is actually working or any value on the attributes window is updated correctly. other than testing purposes hard to think uses for others than health / magicka / fatigue.

the inventory is atm only way to see item count still they are used up. this could made as a message which possible might go kinda annoying if not fitting for the game atmosphere. other way would to spin the count with rag and drop to side of the window.

for the spells window it's testing purposes and seeing the magicka needed for spells + change to do. in the meantime would it be possible to set hud as opague with desired degree or only leave the text hovering. this again would be matter of taste .p

for testing that 2 seconds go well although for keeping frustration down it's optimising for least time for the real time playing.

for which i think the change to do from spells, item count for inventory and heatlh etc status from attributes are the main concerns.

layout editor gui might do the trick better basically for all tastes on fine tuning.
Post Reply