aliens

Author Topic: [DONE] Help test new FOV calculation executable (playable long view distances)  (Read 27623 times)

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
With that save there are 2563 items to be processed into 185 stacks. Turning the inventory page takes 621ms with the current algorithm on my machine. I introduced some changes, and while I still need to clean up the code a bit, it's looking good so far with pages turning in 8ms. With pre-sorting of items from large to small it completes in 5ms, but that also alters the display order.

I for one, would probably not be bothered by altering the display order.  Right now, its so freaking chaotic, that going Large to small would really help.

I mean, yeah, its nice for gauss to be grouped together, but put 7 pages worth of inventory on board, and now try to find those smoke grenades. :?

This is why I'd also love to have that "Sort Items" in inventory ability.  A dropdown from the top, where you could choose "Grenades"  "Pistols" "Rifles" "Infiltration" etc. :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
With that save there are 2563 items to be processed into 185 stacks. Turning the inventory page takes 621ms with the current algorithm on my machine. I introduced some changes, and while I still need to clean up the code a bit, it's looking good so far with pages turning in 8ms. With pre-sorting of items from large to small it completes in 5ms, but that also alters the display order.

I vote for not changing the order.
8ms and 5ms is no difference... and this way it has a better chance to get upstream into vanilla.

This is why I'd also love to have that "Sort Items" in inventory ability.  A dropdown from the top, where you could choose "Grenades"  "Pistols" "Rifles" "Infiltration" etc. :)

Already on my todo list.
« Last Edit: May 03, 2016, 12:23:06 am by Meridian »

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Displaying items by categories in the inventory will be cool!

As for sorting, large to small isn't too bad but that's not much to go from. There's a whole lot of 3x2, 3x1 and 1x1 items, Is it done by listOrder currently? That's what I would prefer to see. Then it groups all your melee weapons first, then guns, sort of by damage/tech level, then equipment.

I don't really care for "maximum packing", ie filling all the squares at the beginning. In fact, it tends to make things really hard to find since their positions depend on what else you have packed. Personally, ordering by list order would be best. That keeps clips next to their guns and things sorted in the way we are used to from the items lists.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Sorting by size AKA "you will never find ammo for your weapon". No, please, I'd rather not :) The performance gain is already impressive.

Offline Stian

  • Sergeant
  • **
  • Posts: 30
    • View Profile
I uploaded the source on Github and as a pull request to oxce2.9-plus-proto. I retained the item order. Without the debug info it ended up with stacking Meridian's test save inventory in 5.2ms. Hopefully that should give enough room, even when we account for larger item collections.

This is why I'd also love to have that "Sort Items" in inventory ability.  A dropdown from the top, where you could choose "Grenades"  "Pistols" "Rifles" "Infiltration" etc. :)
Already on my todo list.
I changed it so that it should be easier to filter items of interest. If you remove any items you do not wish to display from the "itemListOrder" vector on about line 1066 it shouldn't show up on the display. Hope that helps.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile

Offline Stian

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Thanks for the notification Meridian. Uploaded the fix.

Offline Stian

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Here's an animation of my latest inventory experiment (may have to click the image to animate). A search field for those really big inventory lists.

It currently allows searching by the (localized) name of items. There's still some work to do, like allowing damage types to be searched for, and hiding artifacts, as well as some useability improvements. Shouldn't take all too long though.

Offline karadoc

  • Colonel
  • ****
  • Posts: 232
    • View Profile
That looks excellent. I often think about that kind of search filter, but I didn't think anyone would take the time to implement it!

The only bad thing is that if the loadout screen has a search filter, I'm going to be wishing for a search filter everywhere else as well! In particular, it would sometimes be really handy to search the Vaults and Fence screens (although, I'm getting to the point where I've memorised where the most important things are anyway...)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Here's an animation of my latest inventory experiment (may have to click the image to animate). A search field for those really big inventory lists.

It currently allows searching by the (localized) name of items. There's still some work to do, like allowing damage types to be searched for, and hiding artifacts, as well as some useability improvements. Shouldn't take all too long though.

This looks very good indeed.
Search box component could be used on many other places too.

A few comments/thoughts:
- searchbox should be probably on a different place than the current tooltip, so that they don't overlap... maybe put a small searchbox where the tooltip is now and move the tooltip slightly more to the right... or somehow show one or the other, depending on situation?
- if you implement a search box component, it would be nice if it had a nice UI, for example a border, background color, maybe a watermark ("search here...") and a small "x" on the right side to clear the content... I'm thinking something with a size/height of a button/combobox... too bad there is really barely any space left on the inventory screen... it won't be easy to fit it in nicely (unless you already solved that :)

Anyway, just thinking out loud, looking forward to merging your feature(s) into OXCE+ ;-)

Offline Stian

  • Sergeant
  • **
  • Posts: 30
    • View Profile
Yeah, space is really at a premium on that screen. I thought of placing it to the side, but some items have really long names and may overlap. I considered it as a seperate button, but a pop-up would require more clicks and may not allow the user to manipulate the inventory while searching. That search component idea with a wrapping box and an x to clear sounds pretty good though, so I may have to rethink the whole placement.

The current implementation shares the location with the item/button tooltip. If the user hovers over the tooltip it changes to a "click to search" string. If clicked it disables the item/button tooltips while input is active. The filter updates live as in the animation, but if the user presses enter the filter is saved and tooltip functionality is returned. I'm thinking of adding a filter active prompt to the tooltip whenever the tooltip is empty to reduce confusion ("didn't I have more items than this!?").

Technical implementationwise it's not a component (yet atleast), I'm simply using the TextEdit box with it slightly changed to allow exiting with zero-length strings. Should be room for something similar in the upper left of the workshop screen, right? :)


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Should be room for something similar in the upper left of the workshop screen, right? :)

There is now... but I want to add another filter there with more options:
 - Default
 - Default (supplies ok)
 - Default (no supplies)
 - New
 - Facility required
 - Disabled
 - Everything

And also change the button on bottom left to a combobox with more actions:
->Mark all as new
->Mark all as seen
->Mark all as disabled
->Mark all as enabled

Also right-click would change item state state from new -> normal (enabled) -> disabled -> new.

But with a search box... this might all change, we'll see :P
« Last Edit: May 22, 2016, 02:38:41 pm by Meridian »

Offline Kammerer

  • Colonel
  • ****
  • Posts: 141
    • View Profile
I don't really know if it is a good idea to make a reminder here (if so, I'm really sorry for being offtopic) but you, guys, are talking about the interface dimensions problems and maybe you haven't seen that: https://openxcom.org/forum/index.php/topic,1558.0.html. xracer was working on a higher resolution version of the OXC interface but as far as I can see looking at the GitHub commits at the moment he doesn't have time to work on his project. If someone could finish the project I think this would give a lot of new possibilities to extend the interface and integrate new features.
« Last Edit: May 22, 2016, 03:44:15 pm by Kammerer »

Offline Xtendo-com

  • Colonel
  • ****
  • Posts: 118
    • View Profile
I think this would give a lot of new possibilities to extend the interface and integrate new features.
That experiment have a one little problem that become to really a headache. Different monitors with different screen resolutions and PPI. Solution requires a correct design from the start of experiment that will works with most resolutions without readaptation.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Cool stuff!

My opinion is this:
Search box in the equip screen = cool gadget
Search box in vaults/store/workshop = lifesaver :)