Hi!
I’m making a point and click game. I’m implementing the typical feature of using an item in your inventory bar on an item in the environment (i.e key on a door).
My question is, what is the best way to go about tracking which tools work on which obstacles?
Right now, I have a scriptable object that keeps track of ID strings related to each tool-obstacle pair. But i feel like this quickly got out of hand as soon as one of the puzzles in the game was to put a mannequin back together, and also didn’t really fit the situation where “many tools were needed for one obstacle”.
My main worries are scalability and avoiding bugs with string reference mismatching.
Other alternatives I can think of is using some kind of JSON serialization, a compositional approach using interfaces or shallow inheritance (Mannequin : Obstacle and then add extra code and / or override methods). Or maybe I’m not approaching the problem with the scriptable object correctly.
Does anybody have any ideas?