Survival Project
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Resource or Type crafting?

Go down

Resource or Type crafting? Empty Resource or Type crafting?

Post by jobro13 Wed Jun 05, 2013 7:35 am

This will need an explanation.

As current, every survival game I played uses resource crafting. That is, you take "small handle" and "bronze axe head" and craft it into a bronze axe. That's resource crafting - in order to add a new tool to a game, such as an iron axe, you need to create a new recipe.

The thing is, I'm more for type crafting now - or atleast, a feature where type crafting is possible.

That's also about resources again. Every resource should get a type. Let's go for the axe, shall we?

Resource: small handle
Type: Handle
Material: Wood

Resource: Stone handle
Type: Handle
Material: Stone

Resource: Stone axe head
Type: Axe head
Material: Stone

Resource: Wood axe head (??)
Type: Axe head
Material: Wood

Now, the recipe for an AXE (not a "wooden axe" or something) is this;

Recipe "Axe"
RecipeType: "Type"
Ingredients = {"Axe head", "Handle"}
Output: Axe

When you try to craft a "type craft" the system checks if the types of the entered objects are there. Just as in the current game, the order doesn't work. Technically speaking, it only checks if the number of ingredients are >=.

Then, the output. It puts out a "Tool" with the name "Axe" with Handle (input handle) and Axe head (input axe head). Now, we include some kind of logic here that defines the durability, strength, etc. of this axe.

We can also do this in the current engine - the exception is tough that we would have to create a recipe for EVERY combination that is possible. In this, it's not a lot (only 4), but imagine if we add more handle types or axe heads, it's overview would be lost.

Thinking of it, I think this should be incorporated with support of resource crafting - tough, I think it's better that every recipe will be defined as type. (This is the flexibility part I'm talking about! If we want to add for example a new handle type, we just define it as type "Handle" and define some kind of strength / durability thing in it and we don't have to worry about the recipe itself!)

jobro13
jobro13

Male Posts : 250
Join date : 2013-06-02

Back to top Go down

Resource or Type crafting? Empty Re: Resource or Type crafting?

Post by Guest Wed Jun 05, 2013 4:37 pm

I quite like the 'Type crafting' idea. On the scripting end of things, it wouldn't be very difficult to manage. I can think of a few ways which would prevent requiring having a recipe for every possible combination.

Guest
Guest


Back to top Go down

Resource or Type crafting? Empty Re: Resource or Type crafting?

Post by jobro13 Wed Jun 05, 2013 4:41 pm

It's indeed not difficult to manage, it's more that we have to incorporate it from the start Smile

I guess it will be nice, it will also lead to "custom tools"...
jobro13
jobro13

Male Posts : 250
Join date : 2013-06-02

Back to top Go down

Resource or Type crafting? Empty Re: Resource or Type crafting?

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum