Mythruna
April 27, 2024, 07:13:51 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: a idea  (Read 7782 times)
theamericono
Jr. Member
**
Posts: 85


AMERICA


View Profile
« on: July 24, 2013, 03:45:09 PM »

one day when i was riding around i thought of this. what if u build a chest and there was a way to mark out the inside and mark it as a storage decvis and then u could put a certain amount of things in it by the diminsions
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #1 on: July 24, 2013, 04:35:28 PM »

Yeah, all containers will be custom in fact.  I worked out how this interface will work just a few weeks ago as far as inventory management goes.
Logged
BigredRm
Donators
Sr. Member
***
Posts: 379


<-o Word up goes to that modern man o->


View Profile
« Reply #2 on: July 25, 2013, 02:20:28 PM »

Yeah, all containers will be custom in fact.  I worked out how this interface will work just a few weeks ago as far as inventory management goes.
+1
Logged

Visit Iron Island @ 1708,702
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #3 on: July 25, 2013, 03:03:03 PM »

Yeah, all containers will be custom in fact.  I worked out how this interface will work just a few weeks ago as far as inventory management goes.
+1

It's funny because the math I came up with for doing this (treating 3D objects as 2D in a layout) shouldn't work.  But surprisingly it does for every object I've come up with so far.  There are some cases where two objects next to each other might look strange but not as often as you would think... and generally it only happens with really large round objects (like a barrel) that you wouldn't put in a backpack anyway.

If it turns out to work as well as it does on paper then it means that a bag is a consistent size in inventory management... so it takes up the same size in your pack as roughly the objects it holds would.  Hard to describe without getting low level into the details and I'd rather discover the issues during implementation... but basically it involves scaling the 2D view of an object by its relative depth.  So something long, thin, and flat like a sword might look slightly disproportionately scaled next to something more cube shaped.  But since the rescale is based on the whole 2D profile, it's not as bad as you'd think.

It's a nice compromise, I think.  Hopefully it turns out to work.  Smiley
Logged
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #4 on: July 25, 2013, 05:36:39 PM »

Yeah, all containers will be custom in fact.  I worked out how this interface will work just a few weeks ago as far as inventory management goes.
+1

It's funny because the math I came up with for doing this (treating 3D objects as 2D in a layout) shouldn't work.  But surprisingly it does for every object I've come up with so far.  There are some cases where two objects next to each other might look strange but not as often as you would think... and generally it only happens with really large round objects (like a barrel) that you wouldn't put in a backpack anyway.

If it turns out to work as well as it does on paper then it means that a bag is a consistent size in inventory management... so it takes up the same size in your pack as roughly the objects it holds would.  Hard to describe without getting low level into the details and I'd rather discover the issues during implementation... but basically it involves scaling the 2D view of an object by its relative depth.  So something long, thin, and flat like a sword might look slightly disproportionately scaled next to something more cube shaped.  But since the rescale is based on the whole 2D profile, it's not as bad as you'd think.

It's a nice compromise, I think.  Hopefully it turns out to work.  Smiley
If I understand, and I think I do, that sounds pretty cool.

You say the math shouldn't work. What level of math would I have to know to understand why?
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #5 on: July 25, 2013, 06:26:44 PM »

Yeah, all containers will be custom in fact.  I worked out how this interface will work just a few weeks ago as far as inventory management goes.
+1

It's funny because the math I came up with for doing this (treating 3D objects as 2D in a layout) shouldn't work.  But surprisingly it does for every object I've come up with so far.  There are some cases where two objects next to each other might look strange but not as often as you would think... and generally it only happens with really large round objects (like a barrel) that you wouldn't put in a backpack anyway.

If it turns out to work as well as it does on paper then it means that a bag is a consistent size in inventory management... so it takes up the same size in your pack as roughly the objects it holds would.  Hard to describe without getting low level into the details and I'd rather discover the issues during implementation... but basically it involves scaling the 2D view of an object by its relative depth.  So something long, thin, and flat like a sword might look slightly disproportionately scaled next to something more cube shaped.  But since the rescale is based on the whole 2D profile, it's not as bad as you'd think.

It's a nice compromise, I think.  Hopefully it turns out to work.  Smiley
If I understand, and I think I do, that sounds pretty cool.

You say the math shouldn't work. What level of math would I have to know to understand why?

It's not so much the math exactly.  Just that it seems like it wouldn't work as well as it does.

I basically take a 2D view of the object from a particular direction to present the largest 2D area... then I scale that by the depth in such a way that the overall volume is maintained.  Since a sword is only one unit deep, it doesn't get scaled at all... one unit = one block in the inventory view.  A book doesn't get scaled either.  But something like a small chest would be scaled based on the non-visible axis so that it maintains the same unit volume.

So, an 8x8x4 box has a visible unscaled area of 64 but the volume should be 256... so I scale it up by 2.  That effectively makes it 16x16 in the inventory units which maintains a visible volume of 256.  So in inventory, that box would look twice as big as it should relative to other objects but turns out to be a pretty accurate way to model 3D inventory as 2D.  The best part is that the inside of the box is also a nice 2D approximation of what the box will hold.

The really interesting thing that happens as a side-effect is that things that would be too long for a particular container are still too long.  And most long things that could technically be squeezed in can be squeezed in.

Some bags like a backpack, there will be special rules that over-length items can hang out of the top as long as they reach all the way to the bottom.  And even that gets modeled nicely in a 2D view.

Items that are smaller than a unit (a unit for now is 5x5x5 cm by the way... about two inches) can be stacked in homogenous stacks.  I worked out a few examples of this to figure out what size commons stacks of things would be... like arrows.  Comes to about 25 arrows per stack which seems to be a nice round number, thus making me feel even better about this system.

It's certainly no worse than every other RPG I've ever played and in many cases it will be better.  Plus, I had to think of something that would work consistently with player-crafted randomness... and now if you make something really bizarre and awkward it will take an appropriately awkward amount of space. Wink
Logged
belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #6 on: July 26, 2013, 07:19:28 PM »

It's funny because the math I came up with for doing this (treating 3D objects as 2D in a layout) shouldn't work.  But surprisingly it does for every object I've come up with so far.  There are some cases where two objects next to each other might look strange but not as often as you would think... and generally it only happens with really large round objects (like a barrel) that you wouldn't put in a backpack anyway.

If it turns out to work as well as it does on paper then it means that a bag is a consistent size in inventory management... so it takes up the same size in your pack as roughly the objects it holds would.  Hard to describe without getting low level into the details and I'd rather discover the issues during implementation... but basically it involves scaling the 2D view of an object by its relative depth.  So something long, thin, and flat like a sword might look slightly disproportionately scaled next to something more cube shaped.  But since the rescale is based on the whole 2D profile, it's not as bad as you'd think.

It's a nice compromise, I think.  Hopefully it turns out to work.  Smiley
sounds cool. another thing i'd love to see in action!
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!