This is the first time I've ever heard of SFML, but it seems like a cool API. I'm afraid I don't know of any tutorials for it to show you how to make an inventory system. I personally couldn't find a good inventory system tutorial in XNA 4.0 and C# like I used here. All I could do was plan as much as I could for it, then implement my design and hope for the best. There are certainly many things I wish I could change, but it would be time consuming. But at least you learn from your mistakes :)
@missmely32712 жыл бұрын
That's right, I just had to look up the format specifically for C#, but it's the same idea: String.Format("{0:0.##}", critChance * 100.0f) is what I ended up changing to fix it real quick :)
@missmely32712 жыл бұрын
I'm afraid I don't know where to begin because I don't know what is made available to you through SFML. As well as having the option of using pointers in C++. As far as going about designing it, I can say that I just had to think object-oriented. I basically created a Weapon and Armor class to hold their own stats. Then I had a Player class hold on to a container (in my case dictionary, for readability) of Weapon and one of Armor. Then I would remove/add to those containers accordingly.
@Pikmeir12 жыл бұрын
This looks pretty solid! I'm trying to make just a simple inventory system (I'm using C++ and SFML) and I'm not sure how to use linked lists together with SFML to make an inventory system. Did you find any tutorials/tips how to make a 2D inventory system? I thought it'd be easy when I started my game but it's like a brick wall now, lol.
@Pikmeir12 жыл бұрын
I wish I knew C# as well, but I'm still not proficient at all in C++ to learn other languages. Do you have any tips for me on how to set up an inventory system in C++?