Deus Ex-like (grid-based) inventory screen?

Started by frission, Fri 11/01/2008 18:21:37

Previous topic - Next topic

frission

Here's a random thought I had: how would one go about creating a Deus Ex-like inventory screen in AGS? For those not familiar, the inventory in Deus Ex was a big grid, and different items took up different amounts of space. You could drag different items around to make more room for big things and had to be very careful about inventory management.

Here is a link to an image of the screen: http://www.the-spoiler.com/Sinjin/DEUSEX/inventory.jpg

Anyway, I couldn't think of an obvious way to do something like this in AGS, but thought I would ask! I had an idea for a possible game where the player would have a very limited (read: realistic) inventory system and had to make a lot of decisions about what to pick up (rather than the "fit everything you see into your pocket" model of most adventure games).

Any thoughts? Obviously the base would have to be a GUI of some sort and you'd need some sort of matrix to keep track of item locations, but what about dragging and dropping? It doesn't sound like something AGS would natively support but I am always ready to be surprised when it comes to AGS! :)

Khris

#1
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27384.0

Edit:
Btw: I gotta say I hate games with limited inventory. It always feels like an artificial way to up the game's length or difficulty. It's supposed to be realistic, but that isn't automatically a good thing. It's supposed to be a game, not real life. There are a few discussions about this already out there in the forums and this is the technical forum, so I won't go into detail any further here. Just my two cents I had to get rid of.


Radiant


Shane 'ProgZmax' Stevens

#4
Aww, you won't like my new game then, Khrismuc ;(.  I like inventory sizes in games because it adds item management and a need to decide what are the most important items rather than just picking up everything at will.  Indeed, the massive inventories full of disjointed items is one of the things that eventually turned me off of adventure games for awhile, and I grew up playing just as many rpgs as I did ag's so this style of inventory management is natural to me.

As far as designing the interface goes, yeah, you could make them an arrangement of buttons but that wouldn't solve the different sized elements issue.  I haven't really tried it but I strongly suspect you couldn't create an exact copy of the deus ex inventory with the AGS guis.  You would most likely have to RawDraw your own gui with a 2D array that held id numbers from 0-x (where 0 is no image and x is the last inventory item) and would draw the contents of the array to the section of the screen where the gui needed to be.  The drag and drop aspect would appear when you clicked on an item; the mouse icon would change to the id of the grid square (if any) based on a look-up function that allowed you to easily reference the ids and return their dimensions and sprite number.  The sprite number would then be passed to your mouse icon and a temp 'carrying' variable set to the array value of the item (so if you release the button before moving it onto an acceptable square the mouse will return to the default cursor).  When you let go of the left button it could then do a nested while loop check of the array to make sure there are enough grid spaces neighboring the grid box you are over by comparing the mouse x/y values to the array initial drawing position and grid box sizes.  Alternatively, you could simplify it by having a single click pick up an object and then a single click to drop it.  Once the inventory item is in a place it can be moved, those array slots would be replaced with the value in the carrying variable and the original slot the item was in would be zeroed out.  Inside the while loop would be a report if you try to place an item in a selection of slots that are occupied. 

I'm sorry if this is confusing but I just wrote it down as I would theoretically approach doing it myself.  There's more to do, naturally, like to make the inventory behave like a gui with an on/off option, but if you can understand what I'm getting at up there you should be able to do something like this without too much trouble.

frission

Quote
Btw: I gotta say I hate games with limited inventory. It always feels like an artificial way to up the game's length or difficulty. It's supposed to be realistic, but that isn't automatically a good thing. It's supposed to be a game, not real life. There are a few discussions about this already out there in the forums and this is the technical forum, so I won't go into detail any further here. Just my two cents I had to get rid of.

I feel the same way, no worries. I think that unless one has a very good reason for introducing such constraints they are usually best avoided. In the specific game idea I have in mind, it would make a bit more sense than it would in most games, I think, and wouldn't be just an arbitrary thing tacked on to make things harder.

SMF spam blocked by CleanTalk