Advertisement

simple crafting system

Started by September 20, 2014 04:01 PM
21 comments, last by imontheverge7 10 years, 3 months ago

once you "know" a recipe, you should be able to activate it quickly if you have the required materials. That said, I haven't yet figured out a neat solution for that in my game, though it is on my todo list.

Why not just make a recipe log (list) in some subpane of either the player's inventory or his journal/logbook (if you have that in the game)?

Then you just open the subpane, click on the recipe and it either shows it through text or some visual output in whatever area of that subpane that you assign as the output canvas.

I'm trying to understand what your inventory looks like.

If I were you, I would add a "ghost" item of whatever could then be crafted to the inventory (provided you don't have too many of them). Just make it gray-scale or partially transparent (or something comparable). This item could be added which, if the player chooses it, will craft it and remove the others (it should just be sure to state that in the description).
I wouldn't give them anything they have to interact with when it happens (as others said, that would get annoying), but whenever they get a new ghost item added, I'd have it appear and fade over whatever area you access the inventory from so they know there's something new available.

A number of people have suggested fine methods for checking what items were available for crafting, etc. and it really doesn't matter too much if it's not the most efficient code in the world, so I won't weigh in on that.
Advertisement

Just an update: I ended up creating a ListComparer class that compares the recipes to the items in my inventory and once I have enough items for the recipe, the icon of the object pops up in a little box. It works splendidly so far :)

This topic is closed to new replies.

Advertisement