Mythruna
March 28, 2024, 01:06:34 PM *
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] 2
  Print  
Author Topic: Inventory progress...  (Read 17858 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: November 11, 2013, 11:58:35 PM »

Last week was a little touch and go since the wife was out of town for three days but I was still able to make some progress despite trips to the trainstation, watching kids, etc..

Most of the week was spent in the object scripting system which is way way way better than in the last engine.  I needed it for proper inventory management since only the 'back end' will know whether an object can really go into inventory or whether an object is equipped to one hand or both and so on.  The last system had very limited object interaction (just through pop-up menus mostly) and then any game-level scripting was done with separate non-object based actions.  (Existing modders may be familiar with this.)

The new system treats objects more like real Object Oriented Programming.  You can define actions on objects that take various parameters, they can easily call the actions of other objects, and so on.  So rather than have a bunch of root-level commands that the client sends to the back end, everything (at least so far as I've conceived) will be done right on the objects.  If the game wants to have the player equip something in his right hand then the game invokes an action on the player.  (In groovy this would look like, player.equipRight(someItem))

It also means that for moving things around in the backpack, I can call actions directly on the backpack... backpack.moveItem(someItem, some location) or whatever.  Or more importantly, someItem.drop(location) to drop something on the ground... and then if the object is undroppable the scripting has a chance to ignore that action and keep the item right where it is.

Finally Friday I was able to start turning this into something that the UI could use.  I had to define at least one new style object and/or patch up some old objects (my test world still has the test objects from the old engine)... and debug the scripting layer as I went.  Last night I was finally loading object models into the inventory screen.

Today I was able to get them sized properly for the 2D inventory scale... and draggable.  Here we see a screen with my build wands (an earlier bug gave me some duplicates) as well as some old cruft from the last engine (pieces of paper and a giant pencil).


Right now the objects are just draggable and the inventory doesn't really know they are in it or anything.  I sort of just dragged them into position for this screen shot.

But it's progress just the same.
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #1 on: November 12, 2013, 01:42:03 AM »

Hah! I like the concept of the backpack being an actual 3D object. This is refreshing to see.
calling functions seems easier than before, also. Is stacking possible with the limit of weight?
« Last Edit: November 12, 2013, 01:46:31 AM by Moonkey » Logged

Mythruna: Don't you dare read any posts I made before 2014.
Budehgong
Donators
Full Member
***
Posts: 101



View Profile
« Reply #2 on: November 12, 2013, 04:07:03 AM »

This does seem like some proper progress; can't wait till the next update.
Logged

Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #3 on: November 12, 2013, 03:25:27 PM »

Inventory management seems like a really great subject to touch on, I guess because that simple inventory will just connect so many other things to it..
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #4 on: November 12, 2013, 04:39:57 PM »

Inventory management seems like a really great subject to touch on, I guess because that simple inventory will just connect so many other things to it..

Inventory mostly because it then leads to custom tools... and the whole infrastructure to support those two things is fundamental to nearly everything.

But for example, if I want to test the physics involved in chopping a tree down, or lighting a fire that spreads, or placing a river, or whatever... I no longer need to have the initiation systems running as I can quickly cobble together some wand or tool that lets me point+click to test the function.

Development always goes faster when I can work on what inspires me at any given moment... even if it's just a break from the other stuff.  The lack of an easy way to introduce these tools has been a real limiting factor in this regard.
Logged
ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #5 on: November 12, 2013, 05:54:43 PM »

hmm will the player be able to carry more than one back pack (and have it apear on their model) also will their be different kinds of packs example fanny pack, satchel or leg pack
Logged

pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #6 on: November 12, 2013, 11:35:26 PM »

hmm will the player be able to carry more than one back pack (and have it apear on their model) also will their be different kinds of packs example fanny pack, satchel or leg pack

That's kind of the idea.

Though only one backpack at a time since you only have one back.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #7 on: November 13, 2013, 01:51:13 AM »

Working out the object 'cells' look. More tweaking needed but it's getting there.





P.S.: I really need to create a 'metal' material soon because all of this stone is starting to annoy me.
Logged
Moonkey
Hero Member
*****
Posts: 1587

This is probably a picture.


View Profile
« Reply #8 on: November 13, 2013, 01:33:37 PM »

Mythruna: The Stone Age
Logged

Mythruna: Don't you dare read any posts I made before 2014.
ebag51
Donators
Hero Member
***
Posts: 531


View Profile
« Reply #9 on: November 13, 2013, 07:12:13 PM »

Working out the object 'cells' look. More tweaking needed but it's getting there.





P.S.: I really need to create a 'metal' material soon because all of this stone is starting to annoy me.
yay metal material finally  Tongue
Logged

belgariad87
Donators
Hero Member
***
Posts: 507


RPG player for life


View Profile
« Reply #10 on: November 13, 2013, 08:38:22 PM »

good show. interesting daggers
Logged

Specs for future reference:
Windows 7 64bit ; Intel Quad Core ; 8GB RAM ; AMD Radeon HD 6800 ; TB HD
BenKenobiWan
Friendly Moderator
Donators
Hero Member
***
Posts: 674


Jesus loves you!


View Profile
« Reply #11 on: November 13, 2013, 10:26:25 PM »

It's looking nice!

I'm not sure if I like the grid in the background, though. If you have cells around the objects, you might not need a grid, just a thought. Then you could also have items whose size includes partial units.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #12 on: November 14, 2013, 11:11:07 AM »

It's looking nice!

I'm not sure if I like the grid in the background, though. If you have cells around the objects, you might not need a grid, just a thought. Then you could also have items whose size includes partial units.

Objects will be placed on a grid.  Items smaller than a grid cell will have to be stackable.  So I display the grid so you can see where to place stuff.

The work required (especially on the backend) to manage "inventory can be placed at any floating-point location" is not worth the result.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #13 on: November 15, 2013, 12:43:55 AM »

Another inventory snapshot.  I spent yesterday playing with some memory saving techniques so there wasn't a lot of progress.  But I did put together some quick steel materials, from a low quality on through to the "black steel" which I haven't really talked about before.

So we see that the shovel got an upgrade and this player is now equipped with several forms of hunting knife, from basic through to 'black steel'.  It's tough to see the detail in inventory, I guess... hopefully the material registers better when a) the blade meshes are made differently, and b) when they are being waved around in your face. Wink



(for fun, you can take a look at the DMem: number and compare it to the screen shot from a few days ago.)
« Last Edit: November 15, 2013, 12:46:16 AM by pspeed » Logged
Michael
Donators
Hero Member
***
Posts: 2166



View Profile
« Reply #14 on: November 15, 2013, 05:52:59 AM »

Shiny Smiley
Logged
Pages: [1] 2
  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!