Mythruna

Development => Blog => Topic started by: pspeed on November 11, 2013, 11:58:35 PM



Title: Inventory progress...
Post by: pspeed 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).
(http://i.imgur.com/xi5iz7z.png)

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.


Title: Re: Inventory progress...
Post by: Moonkey 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?


Title: Re: Inventory progress...
Post by: Budehgong on November 12, 2013, 04:07:03 AM
This does seem like some proper progress; can't wait till the next update.


Title: Re: Inventory progress...
Post by: Michael 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..


Title: Re: Inventory progress...
Post by: pspeed 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.


Title: Re: Inventory progress...
Post by: ebag51 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


Title: Re: Inventory progress...
Post by: pspeed 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.


Title: Re: Inventory progress...
Post by: pspeed on November 13, 2013, 01:51:13 AM
Working out the object 'cells' look. More tweaking needed but it's getting there.

(http://i.imgur.com/4OhtjEl.png)



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


Title: Re: Inventory progress...
Post by: Moonkey on November 13, 2013, 01:33:37 PM
Mythruna: The Stone Age


Title: Re: Inventory progress...
Post by: ebag51 on November 13, 2013, 07:12:13 PM
Working out the object 'cells' look. More tweaking needed but it's getting there.

(http://i.imgur.com/4OhtjEl.png)



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  :P


Title: Re: Inventory progress...
Post by: belgariad87 on November 13, 2013, 08:38:22 PM
good show. interesting daggers


Title: Re: Inventory progress...
Post by: BenKenobiWan 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.


Title: Re: Inventory progress...
Post by: pspeed 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.


Title: Re: Inventory progress...
Post by: pspeed 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. ;)

(http://i.imgur.com/vtLv6As.png)

(for fun, you can take a look at the DMem: number and compare it to the screen shot from a few days ago.)


Title: Re: Inventory progress...
Post by: Michael on November 15, 2013, 05:52:59 AM
Shiny :)


Title: Re: Inventory progress...
Post by: ebag51 on November 15, 2013, 11:31:45 PM
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. ;)

(http://i.imgur.com/vtLv6As.png)

(for fun, you can take a look at the DMem: number and compare it to the screen shot from a few days ago.)
yay now i can finally make a cool looking blueprint object weapon with the new metal materials to carry around with me and rp with on the  main server  :D