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
   

Post Reply



 



Advertisement

Worth A Click