A mini update

7
Official Construct Team Post
Laura_D's avatar
Laura_D
  • 31 Jul, 2020
  • 248 words
  • ~1-2 mins
  • 1,087 visits
  • 1 favourites

Just a quick update from me this week, which I'm sure you're all delighted about!

The Inventory Tutorial was updated yesterday so that now includes a save/load system based on Local Storage and Dictionaries. Two functions form the backbone of the system – one to save data and one to load it, funnily enough.

The save function is called whenever the player picks up or drops an item and saves each inventory array into a dictionary, before adding that dictionary and the numbers dictionary object into local storage.

The loading function then takes the data from the dictionary and loads it back into the correct array. A couple of local storage checks are done at the start of the layout to determine whether or not to load the data using the project files, but that's about all there is to it!

Take a look at the updated project file included with the tutorial if you're curious.

As for what I'm doing at the moment, Kyatric very kindly sent me a drag-and-drop based example of a crafting system. So currently, I'm picking that apart to understand how it works and perhaps come up with some tweaks before I turn it into the first Crafting tutorial. The more I look at crafting mechanics and what could be included in a system, the more I think this is going to develop into a small series of tutorials looking at how different things are managed. So look forward to that!

Subscribe

Get emailed when there are new posts!

  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Curious about your progress as soon comes time for me to implement inventory system of my own. I will definetely keep your examples in mind. Great work!

    Looking forward for updates :)

  • This is very interesting.