The Daily Click ::. Forums ::. Klik Coding Help ::. Diablo like Tetris inventory
 

Post Reply  Post Oekaki 
 

Posted By Message

DakaSha



Registered
  21/10/2008
Points
  32
29th October, 2008 at 06:21:48 -

Ideas?

and no i dont want to know how that roguelikesque game by pixelthief was doen because its not a dibalo like inventory
checked the articles and crap but cant find anything

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
29th October, 2008 at 13:22:26 -

Well I've got this code lying around, but it appears to be from ~1999-2001, so it might not be the best coding:
http://claniraq.googlepages.com/Inventory4.gam



 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

DakaSha



Registered
  21/10/2008
Points
  32
29th October, 2008 at 20:30:25 -

wow pixel thanks ^^
its def enough to work with

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
29th October, 2008 at 20:43:48 -

yeah for applying the actual item stats, like +10 to heroes damage, what you can do is this:
First, have a bunch of values like "+hero damage, +armor" etc, maybe in some objects value A/B/C.
Second, have an always event that sets all these values to zero. Thats very important.
Third, immediately following the always event, have events for every single equipped object, which ADDS to the "+hero damage, +armor" values for each stat. So it runs down the weapon object, with like:
"If weapon value A = 1, add 10 to +hero damage" & "If weapon value A = 2, add 20 to +hero damage".
Do that for every prefix/suffic that you use.


and then you simply set your heroes damage/armor to the base values + the inventory ones. Every frame of gameplay, the game will reset all the values, but set them to the right ones. Because we're adding instead of setting the values, you can have multiple +damage or whatever items, and it will all stack perfectly.

This is how I did it with Gridquest and it worked like a charm.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

DakaSha



Registered
  21/10/2008
Points
  32
29th October, 2008 at 20:49:02 -

Im using MMF2 and when changing character stats i just use a data storage object (usually the named value object).
every frame has this object which contains all player data at all times. i can just add/subtract from it as i see fit


 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
29th October, 2008 at 20:52:42 -

Wow, that is a nice inventory system. Not exactly Tetris-like, but it'd be cool to see a klik game using that one day. I demand a Gridquest 2 made in MMF2

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
29th October, 2008 at 20:58:06 -

lol muz I made that inventory system almost 7-8 years ago >.< I *am* however porting Gridquest into MMF2, so that I can re-release it as a stable app. Won't be releasing it until my related sideprojects are done, however (strategy guide, maps for all levels, and such!).

The problem with adding to player data just *once* when equipping an item is you gotta subtract it again when u remove it, and that gets really complicated. What I recommend is you keep two data storage objects; one records the characters "Stats", and one records the inventory bonuses. Then, when you have an equation that uses the characters stats, like calculating the damage for a weapon, you add *both* the objects' values. So you're recording both the base HP & the +HP from items and then displaying your HP as the sum of the two, for example.

it actually winds up a lot simpler than trying to change your base stats every time u equip something or whatever

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

DakaSha



Registered
  21/10/2008
Points
  32
29th October, 2008 at 21:04:51 -

oh i get it now. yes that might be better

 
n/a

aphant



Registered
  18/05/2008
Points
  1242
29th October, 2008 at 23:21:36 -

Tetris-like meaning you have to arrange your inventory as it gets added? Do the bags bottom out of you fill a line, and drop the items? Or having say a 4x4 inventory grid and having to arrange 2x2, 1x3, etc shaped items? I'm quite confused.

 

DakaSha



Registered
  21/10/2008
Points
  32
30th October, 2008 at 01:04:39 -

uhm... the latter
thats what alot of people call it. tetris because its a 2d grid and items have different shapes and can be arranged. kinda like arranging tetris blocks.

pixelthiefs example is pretty close if not exactly what i mean

 
n/a

aphant



Registered
  18/05/2008
Points
  1242
30th October, 2008 at 02:45:27 -

Everyone I know has called it a grid-based or spacial inventory system. Or spacial-grid, from those "appease everyone" types. Tetris just sounds silly... Tetris is about falling blocks and clearing lines, why would you want to have to manage how to get rid of your items!?

All subject to interpretation, of course.

 

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
30th October, 2008 at 03:02:31 -

The diablo 3 team calls it "Tetris Inventory"! The Diablo 3 team also likes to copy/paste everything from World of Warcraft into diablo 3 and forget everything that made D1 & D2 famous, like a bunch of plagiarists pissing on the last generations collective graves. Yup had to get that out of my system. Can't believe they won't be using this inventory anymore.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

aphant



Registered
  18/05/2008
Points
  1242
30th October, 2008 at 03:46:17 -

I never played Diablo. I'm more into StarCraft. Have grown up on console, RPGs on a computer didn't make sense, until I played Dungeon Siege which uses a similar inventory system.

Blizzard also takes things that worked in the past so that they have a more uniform business model, or some sort of cover-up. WoW's talents come from some system in Diablo, WC3 has multiple campaigns because it worked for SC, D3's art is similar to WoW's because it's "become their style." The Lost Vikings was still their best game ever though, with SC in a very close second.

 

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
30th October, 2008 at 05:07:22 -

I can't honestly tell how Diablo 3 isn't just WoW wrapped around a gothic setting. Its the same inventory, same skill system, same graphics, same user interface. Heck, its being programmed by the same people, the Diablo 1/2 staff all left blizzard a long time ago. I'd feel a lot better if they actually WERE reusing some of the classic design models that made Diablo so genre-defining, instead of just copypastaing stuff from WoW.

well i just would never touch WoW with a 10 foot stick, so i'd be a little concernicus over it

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

DakaSha



Registered
  21/10/2008
Points
  32
30th October, 2008 at 06:04:27 -

sorry that what i call the inventory obviously offends elitists

 
n/a

WillWill

Give me stuff

Registered
  24/07/2006
Points
  552
30th October, 2008 at 07:35:00 -

I've never touched WoW because I know how damn good Blizzard are.

Honestly I don't really care if they take old concepts, because if Blizzard releases something, it IS good. They know by now that they can't risk their reputation of releasing nothing but good stuff, and if something isn't good enough they simply won't release it.

I'm not blindly defending Blizzard here, but it is simply logic really. They have people testing their games, and if they don't like it, Blizzard WILL do something about it. Also for the record, I personally think Starcraft and Warcraft 3 are the best games they've made, after all, Blizzard has been into RTS for a very long time.

 
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
30th October, 2008 at 15:38:55 -


Originally Posted by Pixelthief

Second, have an always event that sets all these values to zero. Thats very important.



Curious, would this be to always have the equipment mods current? If so, it's an interesting way of doing it. In the past I've done it so that equipping gear added set values to the player's stats, and unequipping an item subtracted those same set values from the player's stats. Cool to see a different slant on the same idea.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
30th October, 2008 at 15:48:16 -


Originally Posted by Pixelthief
The problem with adding to player data just *once* when equipping an item is you gotta subtract it again when u remove it, and that gets really complicated.



Oh god yes, extremely. Especially using MMF where you can't have variable arrays like Weapon(X,1) or Item(X,5). I mean I know you have your array object and all (which I use, it's cool) but it's just not as helpful as the ways I was used to before. Object arrays were my #1 programming friend for a lot of my older RPG games.

For Equin 3 (project was unfinished, basically after I made the inventory system- took about a month) I used a lot of spare string objects to temporarily store data, which had to be saved / loaded everytime the player went into the inventory screen. It then took the names of all this and put them into an off-screen list object (for the auto sort feature), and then filled in all the display texts that way. When the player clicked on an item's name, another check was made to display the correct icon of that item, along with what the mods were. The adding to stat / subtracting from stat was done for the equip and remove, and some other stuff to finish it off. REALLY complicated, and I'm sure it wasn't the "best" way, but the thing is it 100% works. It supported carrying 14 items in your backpack (list format) and space for 6 types of equipped gear (helm, armor, shield, weapon, gloves, boots). It had checks so you couldn't equip a shield if you had a 2-handed weapon on and etc too. Maybe one day I'll release the source since I doubt I'll ever finish it. The thing is, it kind of has the little tricks I learned from my VB days which I'm kind of protective of since it took me so long to figure out from years of trial and error with other games.

EDIT: Here we go, an old screenshot of what I'm talking about

Image

Image Edited by the Author.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
30th October, 2008 at 16:04:25 -

The "Tetris-like inventory" is pretty much pointless IMHO. It doesn't make the game any better. It's like the "feature" where you get limited ammo. You'll have more trouble sorting out your inventory and it's harder to code and you'll have a bunch of blank spaces where you don't have anything to put stuff in.

It's only good if you're purposely trying to limit them from picking up stuff, like keeping them from looting armor from corpses. It looks cool, but doesn't go much more beyond that.

Might want to think about it before you spend a few days on it. I've spent too much of my noob years creating engines that never got used

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
31st October, 2008 at 10:56:31 -

I v made a diablo style inventory bout a year ago, but i abandoned that project, only thing i did right was that inventory.
Best bet use array and fast loop.

 
Code me a sausage!
   

Post Reply



 



Advertisement

Worth A Click