Hi. So, I'm pretty sure I know the answer, but here we go.
Whenever we pick up an item in a game, we can't do so again unless the game restarts. I'm not talking about arcade games where the items respawn, I'm talking about game like Paladin of the Sky where if you pick up the money it'd be gone forever. My question is this: How?
Here's what I know:
1: When I write items, I typically have a central list that stores those items.
2: The items have a flag that dictates if they're picked up or not.
3: Here's where things become less clear. If the item is picked up, do I force the loop that iterates through the items to skip over the item in question effectively causing the game to not detect it?
4: I'm assuming that I need to export those items to a file of some sort. Trouble is, when would I do it? When the user saves? When they pick the item up? When they close the game? Do I open the file and rewrite all the items into it, or do I bother and find at which point exactly my item's text is?
5: When dealing with maps, would it be better to store items and the map data inside that map file, or is it better to have 2 files containing map data and items separately?
Pages 1