The game you are trying to view has ceased development and consequently been archived. If you are a member of this game, can demonstrate that it is being actively developed and will be able to keep this profile up to date with the latest news, images, videos and downloads, please contact us with all details and we will consider its re-activation.

Legend of Karnn is a Role Playing game set in a fantasy world where you, the player, must battle foes and complete quests! Currently in early development we have one programmer and one artist working on the game on the side of University and work. Version updates will be available to download from our download section. Due to the switch from SFML to RPG Maker XP (28th April), the story will come a lot faster than we initially expected! The new engine has a lot of the systems complete, so we get to focus on developing the story and modifying the scripts.

Report RSS Planning out the Inventory system.

A look into the Inventory system of Legend of Karnn.

Posted by on

Heya folks! At the moment, the inventory system for Legend of Karnn is in development and I thought it'd be nice to show a little about how I went about planning such a system.

In order to include an inventory into LoK, I needed to also implement item types so I set up 5 classes to this: Item, Consumable, Quest, Equippable & Aesthetic. The latter four classes inherit off of the Item class. This allows me to use a generalized set of functions and variables in all of the sub-classes!

LoK Inventory setup!

So there it is, the Inventory class has the functions you'd expect from it such as addItem() and removeItem() as well as an item container (itemList). You may wonder why the Aesthetic sub-class has no variables or functions. I did this so it's easier to identify items that would be aesthetic and I haven't thought of any item specific functions or variables for that class yet :s.

The current situation of Inventory implementation:
- I have the Inventory's display(), addItem(), itemList and Backgorund working after a little work (getting screwed over by playing too much tekkit!).
- I also have dynamic memory allocation on the equippable item sub-class as well as putting that into the itemList.

What's next to do with the Inventory?
The next thing for me to do is to set up the coordinates for item positions and make functions to check if there is space for new items to be added. After that I plan to get the rest of the functions down. I think it's important for me to not rush a main system of the game and make sure that it's well programmed as the player will be using it a lot throughout the game!

What's next after the Inventory?
What I plan to do after (but it also helps the inventory system) is to make a system to control the player's stats in one place, these would include stats such as:
- Health
- Mana
- Resistance
- Power
- Gold
- Items acquired
- Items equipped

Cheers for reading!

#datMoka

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: