Game Development Community

Inventory GUI

by Ed Johnson · in Game Design and Creative Issues · 03/23/2005 (9:05 pm) · 6 replies

At the moment I'm trying to adapt an inventory resource into my action/adventure game.
What i've been looking at:

Beffy's adaptation of Tim Newell's InventoryManager
Used as a base: got rid of text amount feilds & scroll arrows, and turned text Slots into GuiBitmapCtrl's
//file: starter.fps/client/scripts/InvetoryGui.cs

function clientCmdUpdateInventoryGui(%currSlot,%currAmountSlot,%i,%invName,%invNumber)
{
 %currSlot.setBitmap("~/client/ui/hud/" @ %invName); // new bitmap slot
[b]//^ im not sure if this variable can be used this way, i dunno if its a pointer to the bitmap or the text[/b]

//	%currSlot.setText(%i SPC "-" SPC %invName); [b]// old text stuff[/b]
//	%currAmountSlot.setText(%invNumber);

}
How to add a Weapon HUD
learned how to switch bitmaps thru script..
Tim Newell's inventory popup
realized already uses bitmap icons for inventory, though this is how its called:
function serverCmdDisplayInventory(%client)
{
   //Had to use a string hack to get the data to the client since arrays do not seem to
   //work in function passing
[b]////comment:^^^^^^^ this is really lame ^^^^^^^^^^^^^^^^^^^^^[/b]
   if (%client.player.hasInventory("Rifle"))
        %InvData = "Rifle" @ " " @ %client.player.hasInventory("RifleAmmo") @ " ";
      
   if (%client.player.hasInventory("Crossbow")) {
       %InvData = %InvData @ "Crossbow" @ " " @ %client.player.hasInventory("CrossbowAmmo") @ " ";
   }

[b]////comment:^^^ all items have to be hard coded??  That aint right! nothing Dynamic about it at all[/b]

   //Send the info to the client to display it   
   commandToClient(%client, 'PopInventory',%InvData);
  
}

The Legend of Zelda has been a driving inspiration for this certain project. Its not meant to be a total clone, its half about seeing how much I can reverse-engineer of the game, and also bringing the aspects of the game I enjoyed into my own Torque game..
for example, I like the real-time combat system used as opposed to games like Final Fantasy where its not real time..
Having a handful (3-5) items that are quickly accessable, like what the yellow C buttons would do.. (or like Diablo's quick launch bar)
I also like the variety of objects you can get and use. The inventory system in Legend of Zelda has always been fixed (each item has its own fixed slot) as its a single player game, this is one thing I want to stray away from.
I want to be able to have many many different items all over the game world, and not be limited to 30 or so that can fit on the inventory screen. For the sake of simplicity though, I only want to display a 50px x 50px bitmap of the item in the Inv window.. no text, no amounts, just icons. Maybe a 5 x 5 grid (25 squares) to start out with, if I need to add scrolling I could from there.

The last thing I want to do is completely write my own inventory system from scratch, in fact I do not think I am able. Anyone able to give tips/advice/code/feedback would be appreciated..
How have others handled Torque inventory for genres other than FPS?

#1
03/24/2005 (1:04 pm)
An idea came to me in a dream... a file/folder-like window..

img119.exs.cx/img119/9339/fakeinv2bt.th.png

I'd need to feed the inventory data into the GuiTreeView control..
and also an "icon" space...
#2
03/29/2005 (4:43 pm)
Some refrence images


home.att.net/~captive/cthumbs/bk_pak3.gif
www.macledge.com/Reviews00/deus-ex/inventory_sm.gif
www.macgamer.com/Reviews-old/jp3/inventory.gif
Diablo:www.gamasutra.com/db_area/images/features/game_design/19990115/figure_03.gifwww.diabloii.nu/beta/images/game/misc/misc-005-inventory-weapons-amulet.jpg
www.rpgfan.com/reviews/shiningsoul/ss-04.jpg
www.planetspellforce.com/the_game/images/avatar-inventory.jpg
roger.trideja.com/newton/images/inventory2.gif
#3
07/08/2005 (3:17 pm)
What game is the last screenshot ed?
#4
07/09/2005 (12:17 am)
Quote:What game is the last screenshot ed?
The image is pointing to http://www.planetspellforce.com/the_game/images/avatar-inventory.jpg so I suppose that may give you some clue as to what it might be.
#5
11/25/2005 (5:28 pm)
Hey, Sorry it took so long to reply to this... Finally got some personal stuff out of the way and Torque/GG has been on my mind lately.. So I logged on.

All those images were pulled from Google Image Search, I don't really know which games they are from, but like the last poster said, if you go to the root domain (planetspellforce.com) you might find out.
#6
11/26/2007 (10:27 pm)
Ed, thanks for sharing your experiences. I have just now found them useful.