3
\$\begingroup\$

I do not have any formal education in metallurgy, but I am trying to make a game mechanic based on it. I need to be able to alloy together different metals and alloyable materials such as carbon in different percentages, and get an approximation of the strength and hardness of the resulting alloy. If anyone has any ideas how what I would need to do to calculate such a thing I would be very appreciative, thanks!

\$\endgroup\$
4
  • 3
    \$\begingroup\$ Is your goal a mechanic that is fun, or one that simulates reality to some extent? Those two goals are often exclusive. \$\endgroup\$ Aug 15, 2015 at 18:54
  • \$\begingroup\$ To have fun, but also somewhat realistic, such as if someone alloys copper and tin it should be stronger than either, as with bronze \$\endgroup\$
    – Phoenix
    Aug 15, 2015 at 19:38
  • \$\begingroup\$ Since presumably you'll have a limited number of metal resources available in your game, why not just look up a list of relative hardnesses and hard-code it? Limit the way the player is able to alloy things (otherwise you have to worry about the case when they alloy say 50% tin-copper bronze, and whether that should be weaker than 10% tin-copper, and the player needs to understand metallurgy to play). \$\endgroup\$
    – Aaron D
    Aug 16, 2015 at 16:51
  • \$\begingroup\$ Should some combinations actually become weaker? \$\endgroup\$
    – CLo
    Nov 27, 2015 at 15:21

1 Answer 1

1
\$\begingroup\$

You could take cues from bit fields. Bit fields have the special quality that adding up previous bits is always one less than the next one. So I'd order the metals by hardness, then assign a bit to each one. E.g.:

Quicksilver = 1 Lead = 2 Iron = 4

Then you can add up the metals and get a certain hardness. E.g. adding Quicksilver and Lead would give a harder metal, but still not as hard as Iron.

Of course, this assumes that adding Quicksilver and Lead makes a stronger metal, if Quicksilver actually weakens the lead, you may have to pick the numbers 1 less than each power of 2, and then subtract the smaller from the larger:

Quicksilver = 1 Lead = 3 Iron = 7

and then mixing quicksilver with lead gives 2, which is < Lead but > Quicksilver. Mixing Lead with Iron gives 4, which is still better than Lead. And Quicksilver with Iron wouldn't dilute it as much, but would weaken iron. Would that work for you? Or is that too simplistic?

I guess you would want to draw a curve and then find an equation that expresses it, mathematically spoken.

If you have a limited number of combinations (91 metals is too much, but if you only need 8, there's only 64 combinations), you could just list them all in order, and their combinations, and then give each one a number that represents its hardness. You could put those in a dictionary/map with which metals are involved as the key (in alphabetic order or whatever) to look up the resulting hardness.

Of course, if you want to model flexibility as well, or different ratios of metals, you'd probably find someone well-versed in metallurgy and ask them how it really works. But in most games the combinations are so few that you can just manually generate them.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .