Tuesday, April 1, 2014

Design Dilemma

I'd previously posted about integrating a store into an RPG game for a homework assignment.  I had programmed the store into the game and given the player the ability to "enter" the store.

I ran into a small problem when getting to the next step.  How did I want to set up the menu, and did I want to limit the choices of armor and weapons between the classes?  For instance, should a wizard be able to buy steel armor meant for a fighter?  The wizard class has little health and armor, but has access to a lot of magic points to be able to cast healing spells and powerful damage dealing fireballs.  I decided that heavy armor was just too much to allow them.

I decided to go with a different kind of method for solving this problem.  I could have made everything visible to every class, but only allowed them to buy certain things, but I decided this wasn't necessary.

I am going to hard code the inventory into the store in the background, and display the correct items to each class.  When the player picks their class at the beginning of the game, the program will be told to load those items into the store's displayed inventory.

That means that when you pick a wizard, and visit the store, you will be presented with an array of staves and robes, and when you pick a fighter, you will be able to choose from metal breastplates and swords.  :D