Jump to content


Photo

Inventory Grid


  • Please log in to reply
83 replies to this topic

#26 AluminumHaste

AluminumHaste

    Darkmod Contributor

  • Development Role
  • PipPipPipPipPip
  • 5567 posts

Posted 02 February 2016 - 10:20 AM

Works great man:

 

Attached File  mother_2016-02-02_10.18.54.jpg   39.62KB   0 downloads


I always assumed I'd taste like boot leather.

 

#27 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13686 posts

Posted 02 February 2016 - 10:41 AM

I think having a papyrus background would look a bit too busy. The more subtle the better.
  • Springheel, Melan, Goldwell and 1 other like this

#28 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 02 February 2016 - 03:10 PM

I just downloaded 0.17 from 29-Jan so I can try it tonight. I see it contains a game dll and new engine. Just checking, did you have to modify and recompile those? If it's only GUI changes I'll test it with my svn build, but if you've had to modify the game I'll need to use a 2.03 build. I assume you did have to modify the compiled files... they have the later modified date too. 



#29 Durandall

Durandall

    Member

  • Member
  • PipPip
  • 34 posts

Posted 02 February 2016 - 03:54 PM

If I'd add one comment, it could use a little unobtrusive border work along the lines of the lightgem.

I originally wanted to use some sort of tight dense ironwork as a background and
remove the translucent background squares, but I'm no artist. I'm not a fan of
the public domain clip-art arrow I squeezed in either.

 

Also maybe scale it down so it only takes up the bottom 1/3 to bottom 1/2 of the screen? More akin to how System Shock 2 did the inventory.

 

Systemshock2_ingame_final.jpg

 

Also, instead of just black background behind each item, maybe stretch the papyrus page and use that as a background?

I'm not sure a System Shock 2 design would work, no room for names and having to
scroll over items would be time consuming. I don't see much use in seeing the game
field while in the grid.

 

 

The grid entries mimic the current inventory items 1:1 to maintain compatibility.
Making them smaller would require using a smaller font or risking item name runoff.
I think the large entries are easy on the eyes and 16 items is good for 1 page.
Perhaps removing the category lines would make it less busy?

If anyone wants to try their hand at a different design, feel free to mock something up.
All it would require is modifications to the guis/tdm_invgrid.gui file.
Information on the format can be found by googling doom 3 gui.
You can also take a look at the per-existing TDM guis in tdm_gui01.pk4.

You can view your changes "live" by editing and saving the gui file while TDM is running
and using the console command reloadGuis.
You would probably need a second monitor or play in windowed mode.

It is possible to alter the number of grid items available on a page by copy/pasting
existing entries and increasing their variable numbers/names and screen positions.
Don't forget to change gui::PageSize in InitInventoryGridGUI.

 

 

I just downloaded 0.17 from 29-Jan so I can try it tonight. I see it contains a game dll and new engine. Just checking, did you have to modify and recompile those? If it's only GUI changes I'll test it with my svn build, but if you've had to modify the game I'll need to use a 2.03 build. I assume you did have to modify the compiled files... they have the later modified date too. 

The inventory grid has source code changes, it is not just a gui file. There is no way this could be done with just a gui unfortunately.



#30 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 02 February 2016 - 04:03 PM

The inventory grid has source code changes, it is not just a gui file. There is no way this could be done with just a gui unfortunately.

 

Cool, thanks for confirming. It's not surprising you had to extend the game API. I'll try it with 2.03.



#31 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 02 February 2016 - 05:06 PM

It's working great and a pleasure to use. I'll be forgetting my inventory hotkeys after we get this in the dev build :) Except for lockpicks, which I still like to toggle with P. I've been playing a proper map and not got too far yet so have yet to gather enough inventory items to try multipaging, but so far everything is good. The UI vanishes on any click or by re-pressing the key... great. It fits the hud very nicely.



#32 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35911 posts

Posted 02 February 2016 - 05:08 PM

Any chance you could upload that to SVN Steve?


Posted Image

#33 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 02 February 2016 - 05:20 PM

Sure, if Durandall is ready to share the dll/engine source code patch then I'll check and merge it. We can't use his TDM 2.03 game dll with our svn build because we have script changes in svn that're incompatible with a 2.03 dll.

 

p.s. @Durandall: no need to get the GUI 100% finished for us to merge the source code into the trunk. We can deploy GUI patches later, if you're still working on it. And we can try out your new code with TDM 2.04 in the meantime. 



#34 Durandall

Durandall

    Member

  • Member
  • PipPip
  • 34 posts

Posted 02 February 2016 - 07:21 PM

Finally got TDM compiled in Debian Jessie.

TDM_InvGrid_0.17_Linux.tar.bz2

 

2.03 source patch.

TDM_InvGrid_0.17.patch

 

If the patch isn't working against 2.04, just hand me a copy and I'll apply the changes by hand and re-diff.

Point out anything that sucks or I missed. I'm sure it could use some polishing. I wasn't sure when/if it would get approval.



#35 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 02 February 2016 - 07:39 PM

Thanks. That looks fine at first glance and doesn't look like it'll cross with 2.04 code. I'll try it out tomorrow because it's well past midnight here now *yawn*. Why did you end up tweaking the code that destroys the objectives gui by the way? Did it screw up when transitioning between the two?



#36 Durandall

Durandall

    Member

  • Member
  • PipPip
  • 34 posts

Posted 02 February 2016 - 07:41 PM

Thanks. That looks fine at first glance and doesn't look like it'll cross with 2.04 code. I'll try it out tomorrow because it's well past midnight here now *yawn*. Why did you end up tweaking the code that destroys the objectives gui by the way? Did it screw up when transitioning between the two?

That was just a little extra. We can leave it out. Allows the player to click the objectives gui closed.

Hopefully there aren't too many whitespace issues.



#37 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 03 February 2016 - 01:01 PM

Let's leave in the objectives gui change for people to try. We can always remove it later if need be. Are there any other features that need testing?

 

Tracked: #4286



#38 Durandall

Durandall

    Member

  • Member
  • PipPip
  • 34 posts

Posted 03 February 2016 - 02:19 PM

No other features are included. Just the grid and objectives changes.

If no one has reported any bugs by now, I assume it's all okay.

 

The DEV comment in UpdateInventoryGridGUI() can be removed. Didn't make sense when I wrote it.

I wish I could have solved attacks propagating through weapon_GUI without the need for a delay.



#39 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 03 February 2016 - 03:12 PM

I did manual merging and some reformatting: not your fault, it's because of repetitive code in player.cpp and because it turned out that we do have some GUI bugfixes in 2.04, plus some of our current code conventions aren't obvious from older surrounding code. I'll post my 2.04 patch after a successful test.

I'll try Maxwell16's test map and if that works ok I'll restart BCD which I got halfway through last night. I can't port my savegame from 2.03 to 2.04 so I'll probably be gone some time :)

Is your to-do list complete now? I mean the various features you mentioned on page 1 that you wanted to tweak or add?

p.s. kudos for getting your head round so much code without asking any questions btw! Your first patch touches every level of TDM architecture except the renderer and sound world!!

Edit2: Hmm either I screwed up somewhere on the merge (likely), or we have a 2.04 change that changes outcomes (less likely, but possible). Mousewheel-down works in both 2.03 and 2.04, but mousewheel-up works only in 2.03. I'm not familiar with the human interface device setup. Any clues to where I might need to spot the difference?

Edited by SteveL, 03 February 2016 - 03:41 PM.

  • Bikerdude likes this

#40 Durandall

Durandall

    Member

  • Member
  • PipPip
  • 34 posts

Posted 03 February 2016 - 04:01 PM

I did manual merging and some reformatting: not your fault, it's because of repetitive code in player.cpp and because it turned out that we do have some GUI bugfixes in 2.04, plus some of our current code conventions aren't obvious from older surrounding code. I'll post my 2.04 patch after a successful test.

I'll try Maxwell16's test map and if that works ok I'll restart BCD which I got halfway through last night. I can't port my savegame from 2.03 to 2.04 so I'll probably be gone some time :)

Is your to-do list complete now? I mean the various features you mentioned on page 1 that you wanted to tweak or add?

p.s. kudos for getting your head round so much code without asking any questions btw! Your first patch touches every level of TDM architecture except the renderer and sound world!!

Edit2: Hmm either I screwed up somewhere on the merge (likely), or we have a 2.04 change that changes outcomes (less likely, but possible). Mousewheel-down works in both 2.03 and 2.04, but mousewheel-up works only in 2.03. I'm not familiar with the human interface device setup. Any clues to where I might need to spot the difference?

 

I believe it has all the features I originally wanted and now more.

 

First thing that comes to mind is PerformImpulse in Player.cpp, that is where objective and inventory grid updates occur for those buttons.

Maybe place the calls to updateInventoryGridGUI() before the broadcastNamedEvent call? I was curious as to why objective updates occured before the event was broadcast.

 

I can try applying the changes to 2.04 and see whats up if that doesn't work. I might see something different in 2.04 that I need to work with.


Edited by Durandall, 03 February 2016 - 04:02 PM.

  • Bikerdude likes this

#41 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 03 February 2016 - 06:29 PM

  • First thing that comes to mind is PerformImpulse in Player.cpp, that is where objective and inventory grid updates occur for those buttons.
  • Maybe place the calls to updateInventoryGridGUI() before the broadcastNamedEvent call? I was curious as to why objective updates occured before the event was broadcast.
1. Yes that was it. That list of IMPULSE_XX responses is where the repeated code was that made me do a manual merge. I was missing one of the 11 calls to UpdateInventoryGridGUI(), the one for prevWeapon.
2. It's inconsistent. I spotted it too while looking for the missing line in my merge. I think it's a simple bug.... I'd not noticed this before, but I see it takes 2 mousewheel-ups to scroll up in the in-game objectives but only 1 to scroll down! Probably because the mousewheel-down "nextWeapon" message gets broadcast to the GUIs before the objectives GUI gets updated, but the mousewheel-up "PrevWeapon" message gets broadcast after the objectives GUI update. Testing that hypothesis...

EDIT: yes, switching the order of those lines means you only need one mousewheel move to scroll objectives in either direction.

#42 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 03 February 2016 - 07:10 PM

Any chance you could upload that to SVN Steve?

 

Done. To use in 2.04: update svn, launch game, and bind a key. I used 

bind "u" "_impulse30"

  • Bikerdude, SiyahParsomen and nbohr1more like this

#43 Spooks

Spooks

    Member

  • Member
  • PipPip
  • 314 posts

Posted 04 February 2016 - 08:11 AM

Mockups, you say? Well I had a few ideas about this, I don't know how feasible they are but here's the pitch.
 
Attached File  mockup0.jpg   74.01KB   0 downloads
 
Attached File  mockup1.jpg   81.77KB   0 downloads
 
1) How about slots for buttons that expand/contract the different inventory categories already present. Besides making it easier to sift through large inventories, they would serve as nice bookends to delineate the categories without category lines on every slot. I think having the categories open by default would be best. Categories which usually have 3 or less items in them like the lockpicks and maps wouldn't need such a button as well. Good/bad? Feasible?
 
2) Another way to make it easier to pick out items at a glance is color-coding the categories. I, myself, feel this is problematic for several reasons: a) the colors would be arbitrary, B) making the thing look like a rainbow would look really busy, c) it's a useless feature if you're color blind.
 
3) I feel some flourishes at the borders would be nice. I've done a quick mockup of those too.
 
4) Adding a scrollbar? Hm, dunno.
 
Also, for some criticism, I feel like the inventory items are not centered in the rectangles properly.


Edited by Spooks, 04 February 2016 - 08:17 AM.

  • Melan likes this

My FMs: The King of Diamonds (2016)

 

Visit my Mapbook thread sometimes!


#44 AluminumHaste

AluminumHaste

    Darkmod Contributor

  • Development Role
  • PipPipPipPipPip
  • 5567 posts

Posted 04 February 2016 - 08:31 AM

Very cool,and am I understanding correctly that you have fixed the objectives scrolling issue?

I always assumed I'd taste like boot leather.

 

#45 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 35911 posts

Posted 04 February 2016 - 08:50 AM

I like the minimalist quality of it, and would be hesitant to add much in the way of flourishes or colour.  Perhaps some very minimal brackets in the corners, but nothing beyond that.

 

The icons and the cursor did strike me as quite large, but that might have more to do with recently switching from a 20" CRT to a 27" widescreen monitor.  But my immediate thought was that they could be half the size they are now.

 

The only issue I've noticed so far is that the compass icon did not show properly for me.


Posted Image

#46 New Horizon

New Horizon

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 13686 posts

Posted 04 February 2016 - 09:39 AM

Possible to re-use the frame and flourishes around the lightgem in some way?  Would tie the style together nicely.



#47 Durandall

Durandall

    Member

  • Member
  • PipPip
  • 34 posts

Posted 04 February 2016 - 12:20 PM

Also, for some criticism, I feel like the inventory items are not centered in the rectangles properly.

The grid is an identical copy of the normal inventory display. I did this for compatibility.

Although it should be possible to center them.

 

I like the minimalist quality of it, and would be hesitant to add much in the way of flourishes or colour.  Perhaps some very minimal brackets in the corners, but nothing beyond that.

 

The icons and the cursor did strike me as quite large, but that might have more to do with recently switching from a 20" CRT to a 27" widescreen monitor.  But my immediate thought was that they could be half the size they are now.

 

The only issue I've noticed so far is that the compass icon did not show properly for me.

 

I'm not sure it's wise to make the grids any smaller or the names/categories might run off.

They are all designed for the current inventory system.

I'll do some test and see what I can come up with though.

 

I'm unsure as to why the cursor is so big, but on the main menu it is normal.

I will take a look and see if it's anything I can do.

 

The only reason I can think that the compass would not show up is that you are missing the new icon.

You should have a dds/guis/assets/grid folder with 4 files for the arrows and dds/guis/assets/hud/inventory_icons/compass_icon.dds for the compass.

 

Edit: or the tdm_playertools.def file doesn't contain the modified compass entry that now lists the icon.


Edited by Durandall, 04 February 2016 - 12:30 PM.


#48 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 04 February 2016 - 12:33 PM

The compass icon worked for me. I'll double check what I committed when I get home in about 30 mins.

 

Edit: personally I wouldn't embellish it at all. Decoration would be distracting and it already holds lots of images. I vote for minimalism.


Edited by SteveL, 04 February 2016 - 12:38 PM.

  • Durandall likes this

#49 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3657 posts

Posted 04 February 2016 - 01:35 PM

The only issue I've noticed so far is that the compass icon did not show properly for me.

The compass icon worked for me. I'll double check what I committed when I get home in about 30 mins.

Yep, my fault again. I added the dds icons (5 of them) to my local copy before committing, but I forgot to mark them for version-control before I committed the changes.

SVN users please update to get the icons.

#50 Durandall

Durandall

    Member

  • Member
  • PipPip
  • 34 posts

Posted 04 February 2016 - 02:33 PM

After looking through the code in ui/UserInterface.cpp and a quick test,

I think the large cursor is solved by adding "menugui 1" to the tdm_invgrid.gui Desktop.

 

ex:

windowDef Desktop
{
  rect 0, 0, 640, 480
  menugui 1






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users