Original Post
Hi!
been lurking on these boards for a while now and finally have my own question.
I recently started coding in c# and am making a mix of a text and graphic point and click best compared to japanese adventure games, where all interaction happens in the textbox at the bottom of the screen and the top part visualises parts of the text and who you are talking to.
I have the movement/walking and interaction parts in place, but have been having a very hard time in finding a good way to tackle inventories.
The setup in a nutshell:
spread out in the room are boxes with items in them. when you are close to one you can see the items it contains (max. 5) in a textual list at the bottom of the screen.
the items can be taken out (added to player inventory) and dropped into any of these boxes.
I've created this by using an ArrayList for the box you are close to and the player inventory.
I want it to load up the items based on their location(in which box they are). The player inventory funtions the same as a box too (except for the limitation of 5 items).
Now, besides picking up and dropping, each object has a number of other possible interactions: look, break, open, give, sell
some interactions are possible on one item, but not the other. (ex. you can break a glass, you can't open it. // you cannot break a safe, but you can open it).
So each item will have one or multiple of these actions available. Like the safe example, some objects will also be boxes for other items to be in.
When you select one of these items. I would like to show only the actions that are available to that item.
So what i need to so is save information about each item in the game (about 200).
name
location (which box it is in)
available actions. (look at, pick up)
result of these actions. (ex. giving a photo to a man causes him to cry and tell a story about his lost wife.)
I've come so far that I will need a seperate list for the location and for the other parts of the items, because the location will be dynamic/changing during the game, but the other things won't change.
Do you guys have any tips/ideas how I should get a system for this in place?
I'm not super experienced, but motivated enough to put a lot of time/effort/research into making it work.
Thanks so much!!
been lurking on these boards for a while now and finally have my own question.
I recently started coding in c# and am making a mix of a text and graphic point and click best compared to japanese adventure games, where all interaction happens in the textbox at the bottom of the screen and the top part visualises parts of the text and who you are talking to.
I have the movement/walking and interaction parts in place, but have been having a very hard time in finding a good way to tackle inventories.
The setup in a nutshell:
spread out in the room are boxes with items in them. when you are close to one you can see the items it contains (max. 5) in a textual list at the bottom of the screen.
the items can be taken out (added to player inventory) and dropped into any of these boxes.
I've created this by using an ArrayList for the box you are close to and the player inventory.
I want it to load up the items based on their location(in which box they are). The player inventory funtions the same as a box too (except for the limitation of 5 items).
Now, besides picking up and dropping, each object has a number of other possible interactions: look, break, open, give, sell
some interactions are possible on one item, but not the other. (ex. you can break a glass, you can't open it. // you cannot break a safe, but you can open it).
So each item will have one or multiple of these actions available. Like the safe example, some objects will also be boxes for other items to be in.
When you select one of these items. I would like to show only the actions that are available to that item.
So what i need to so is save information about each item in the game (about 200).
name
location (which box it is in)
available actions. (look at, pick up)
result of these actions. (ex. giving a photo to a man causes him to cry and tell a story about his lost wife.)
I've come so far that I will need a seperate list for the location and for the other parts of the items, because the location will be dynamic/changing during the game, but the other things won't change.
Do you guys have any tips/ideas how I should get a system for this in place?
I'm not super experienced, but motivated enough to put a lot of time/effort/research into making it work.
Thanks so much!!