New Game I'm Making

Hey. I have an idea for a game called "Staff of Magius". It's an RPG and I have some stuff that I'm working on for it.
Here's the stuff I have for it so far:

-characters house (you can drop off your items)
-town
-dungeon you start in
-function for first official dungeon

I'm having some trouble with the house you can drop some stuff in. The function for dropping stuff off won't let me use a global array for some reason, and I wanted some tips on how to make it work.

If you could give me some ideas, that would be great.
Last edited on
closed account (zb0S216C)
Ideas about what, exactly? Features?

1) Shops
2) NPC interaction
3) Make your own weapons & armour
4) Skills

Wazzak
This would be a whole lot easier if you posted a code snippet of the function.

Also, global arrays (for that matter, global anything) are generally considered bad programming practice. Why do they need to be global?
First, the ideas. I already got some ideas from a friend of mine for magic crystals that enhance your abilities and stuff.

Well, it needs to be global because I have two separate functions for depositing items and withdrawing items. I did not know if there was an easier way to do it, so I just went with that. And secondly, for the item dropping itself, here's an example for the code (it's not the whole thing, just a work in progress):

cout<<"Which would you like to drop?\r\n";
cin >> item_drop;
switch ( item_drop ){
case 1:
house_storage(0) = item_index1;
break;
default:
return 0;
break;
}

I don't know if this is the best way to do it (I'm still a beginner at c++), so if there's a better way to do it, please help me.
Topic archived. No new replies allowed.