T
Thijmen Langendam
Guest
Hey guys, so i currently have a basic inventory shown below, where the left side is the inventory and the right side is the crafting menu.
Now how it currently is set up is that there is a grafting grid which is 2 wide and 32 high.
This crafting grid above is setup that the top left square is cell 0, the top right square is cell 7 and then the one below the top left one is cell 8 etc.
This is connected to the crafting grid in the same manner.
Now the player can only place in cells 0, 1, 8, 9, 16, 17, 24 and 25 and not in the others, but can grab from those.
There are 4 non-functional cells, 3, 10, 18 and 26 which is the column with the arrow in it.
The other cells are all the crafting output.
Now i want to make a crafting mechanism such that it will show all crafting possibilities with the input items,
so if i have as input raw wool and a stick, then the output will show toothpicks, a torch and a piece of cloth (random example that makes no sense) because the stick can be turned in to toothpicks,
the raw wool into cloth and the stick + wool into an non-lit torch.
How could i create such a mechanism such that it is still decently fast to check all possible recipes and display all possible output items.
If the player decides to take one of the output items, it should remove the resources that were needed to create that item from the input and of course the item itself from the output.
Now how it currently is set up is that there is a grafting grid which is 2 wide and 32 high.
This crafting grid above is setup that the top left square is cell 0, the top right square is cell 7 and then the one below the top left one is cell 8 etc.
This is connected to the crafting grid in the same manner.
Now the player can only place in cells 0, 1, 8, 9, 16, 17, 24 and 25 and not in the others, but can grab from those.
There are 4 non-functional cells, 3, 10, 18 and 26 which is the column with the arrow in it.
The other cells are all the crafting output.
Now i want to make a crafting mechanism such that it will show all crafting possibilities with the input items,
so if i have as input raw wool and a stick, then the output will show toothpicks, a torch and a piece of cloth (random example that makes no sense) because the stick can be turned in to toothpicks,
the raw wool into cloth and the stick + wool into an non-lit torch.
How could i create such a mechanism such that it is still decently fast to check all possible recipes and display all possible output items.
If the player decides to take one of the output items, it should remove the resources that were needed to create that item from the input and of course the item itself from the output.