Item Database | Making a Simple RPG - Unity 5 Tutorial (Part 9)

preview_player
Показать описание
Support the channel with the new Patreon campaign!

Questions?
Create an account, create a question:

Create a database using JSON to allow us to construct item objects for our player's inventory.

Project Repo

In this series we'll be creating an ARPG-style movement system, a world full of interactable objects, NPCs with dialogue, enemies and attacking, an inventory system, portals, and maybe even a questing system.

Low Poly Asset Pack:

Unity 5:

Making an RPG is a pretty daunting task, but Unity allows us to create all of the basic systems of an RPG without much hassle. This unity tutorial covers creating an RPG-esque inventory item that you can consume by "using" it.

We'll move on to completing the inventory system for our RPG in Unity over the next couple of episodes.

2 in a row?!

Credits:
Edited by KonamiHatchibori
Produced by Austin Gregory
Рекомендации по теме
Комментарии
Автор

This episode was edited by a lovely Patron. If we're able to workout an arrangement you can definitely expect a more consistent release schedule! That being said, the next episode continues the inventory system with the beginnings of an inventory UI. If you would like to keep up with GameGrind and maybe get some sneak peeks, be sure to like me on Facebook.


Thanks guys!

GameGrind
Автор

@5:00 if anyone else couldn't figure out how to create the items.json text file to use in Unity/VS ..On your desktop find & open your project> open assets folder> open JSON folder in Resources> right click any empty spot> create New> Text File> name it items or whatever then drag that file into Unity JSON file if it didn't show up...probably a lot easier way but that's how he did it in another video anyway.

WreckedRevival
Автор

Was confused most of the video but towards the end it all came together. :)

wizzlez
Автор

Loving this series so far, I'm using similar architecture for a project I'm working on. One question I had about this is, how come you went the JSON route instead of using Scriptable Objects? Also, haven't seen future episodes, but It seems like it'd be easier to use a singleton template class and derive all singleton classes from it.

migueltorres
Автор

I was just looking for exactly this! Thank you very much :D.

kokenmillen
Автор

That sounds cool, i will be watching this series from now on :D

fuzzyflux
Автор

Yay! Another episode! And there is going to be more consistent schedule!!!! <3 :D

turricreates
Автор

Thank you so much for making these videos, I really look forward to them!

brandonesqueda
Автор

Thank you so much for your videos :) and i am so glad that was a year ago :) i dont need to wait for next episodes
Your voice is good , you explain perfectly i am noob in C# and i was stuck for some time but i do my homework and i know logic and power of Debugging :) so i manage to get here with my game :) and i will not stop !!

mmoGo
Автор

You are the best! Thank you for all your time and work!

nekrosarts
Автор

Nice! I'm going to tweek this and use a webbased database.

mankeeey
Автор

Will you add UV mapping texture style do your character just do demonstrate cause you are awesome at explaning and keeping it simple

markoperisic
Автор

For those who are unfamiliar with Github like me I found this link to the Download page..

micaiahstevens
Автор

What would be the downside of using a class for items, and creating a new instance for every item in a separate script?

So like Item potion = new Item(info); for every item, then adding those all do a dictionary or list

TheWeirdo
Автор

Why not use C# Structs to define items? Does it matter or is it just preference?

cription
Автор

I've seen people use xml and json. In your opinion, which would be the best to use if my item database is going to have different types of weapons, potions, scrolls, etc.. ?

austin
Автор

i am having issues right at the end her with the
foreach(Item item in Items)
{
if (item.ObjectSlug == itemSlug)
return item;
}
Debug.LogWarning("Couldn't find item: " + itemSlug);
return null;
}

Saying Object Reference not set to an Instance of an object

CptFireworks
Автор

I am getting an error that says "JsonReaderException: After parsing a value an unexpected character was encountered...." for the following line of code:


Items =


I have checked that it is the exact same as the video, and the JSON/Items is the correct reference. I have been stuck for a long time and would appreciate the help

bhavrajthind
Автор

You say database, but can you actually connect to database server, like MS SQL Server using EF for instance?
At least for a case when you have a lot of data to save and you load in lists in memory in the loading screen.

SparkeyAvalon
Автор

I did everything the same as you did so far but when you start running the game at 21:03 and get no initial errors, I can't even run mine because it has an error about the imported package, it says that it could not be loaded even though it's there just like yours, pls help :(

Edit: Just fixed it, my Unity was outdated I think, even though my Unity was the exact same version as yours, updating it fixed this error at least, for anyone out there getting this same problem

chaotaz