I want to make a game with a crafting system that is similar to minecraft in that you go to a crafting bench and add various components from your inventory to make items. Does anyone know how to do that kind of thing (I have gamesfactory 2), or have a link to a tutorial or site that can help with that?
I searched this site for "crafting" and "crafting system" but didn't come up with anything.
Also, if you know a site with tutorials on making rpgs, in particular: inventory and crafting systems and making map editors that would be great. I have found learning the basics of mmf/GF easy such as making custom platform movement etc, but have never been able to break through to get my head around rpg systems, mainly because I haven't found any comprehensive tutorials.
Any help much appreciated thanks!
BTW; I'm looking at an action rpg, not turn based/ old Japanese style rpgs.
Don't mean to sound rude or anything, but if you can't figure out how to do this, making a full-blown RPG complex enough to have a crafting system may be a bit out of your league. I really don't mean to put you down, but you really need to be experienced in MMF2 in order to make the game it seems like you want to. Maybe you should try to make some simpler games first, to learn some things from experience.
All that being said (and I honestly hope you don't take it the wrong way), I will get to your question.
An easy way to do this would be to have an array to hold the grid of your crafting table. When the user clicks on a certain square in the crafting menu, it changes the corresponding value depending on what you are holding. You can store what the user is holding in an alterable value. When the user tries to craft something, compare the array to the arrays you have stored and see if anything can be made. You should do all of the checking between arrays with fastloops.
Of course, this probably isn't the most efficient way, but I'm pretty sure it's the easiest to understand and simplest to implement.
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.
Thanks for the reply Monkey! I just want to see how the system works and have an experiment, doing a full rpg is something for the (far) future. I figure I can learn a lot about the program by making some basic sytems and then when I have the basics down I can try and put it together for something bigger if I have the energy.
So looking at your advice, as a really simple example how about something like this:
When the player is touching the crafting table and presses enter, it brings up the player inventory and a crafting grid. If the player clicks an inventory item it goes to the crafting grid. When items in the crafting grid can combine to make something a "craft" button below the grid is ungreyed. Press the button and the items disappear and the newly crafted item appears in the grid. Click the new item to put it in the inventory.
I'll use your advice and the tutorial on the diablo style inventory on this site to try and put a simple thing like that together over the weekend.
I don't have the time to give you a working example, but the way minecraft does it (i believe) is by having a list of 'recipes'. meaning, when you put things on the workbench grid, it checks the signature against a list of recipes to produce a new item. There's numerous ways to implement the list in an actual language. You will be far more limited in mmf, unless you use a scripting extension.
the xbox version of minecraft doesnt even have a workbench i believe. not a physical crafting one anyways. I believe it just has a list of everything you can make with your current inventory, and how much it requires of certain items to craft.
Firstly, I cannot over-emphasize just how difficult it is to make an RPG (even a relatively simple one). The reason there are so few examples & articles is that few (if any) klik RPGs have ever been completed (so don't expect a lot of help).
The jump in complexity from making a custom platform engine, to making an RPG - or even just a single component of an RPG, such as a dialogue or inventory system - is absolutely vast.