[MUD-Dev] Virtual Chemistry

Matt Chatterley root at mpc.dyn.ml.org
Sun Aug 3 09:35:24 CEST 1997


On Sat, 2 Aug 1997, Nathan Yospe wrote:

> On Fri, 1 Aug 1997, Matt Chatterley wrote:
> 
> :On Fri, 1 Aug 1997, Nathan Yospe wrote:
> :> On Fri, 1 Aug 1997, Matt Chatterley wrote:
> :> Ghah, gets messy. I have a series of "universal" chemical attributes, and
> :> one of "specialized" attributes, that can be inherited by any substance.
> :> There are few specialized attributes... none so far. But I have individual
> :> compounds seperately defined. No way am I going to try to _predict_ the
> :> results of a reaction. Undefined reactions just fizzle.
> 
> :Works nicely for me - mind you, IIRC, you're more a bio type guy, aren't
> :you? Maths/Physics are my real areas of interest (along with electronics),
> :so this sort of model appeals to me from the start.
> 
> Math physics myself, to tell the truth. Software and biomed are just
> convenient expressions of my current interest. My approach to both is that
> of a physicist with a computer - bottom up, then adjust for
> attractiveness.

<g> I think I'm afraid of someone tackling bio/med from a physics
background. ;)
 
> :> :I was initially unsure about this, but the more I thought - the more I
> :> :liked it, and, for what I want to create, it makes perfect sense, and
> :> :seems to work nicely (at least theoretically).
> 
> :> Luck to you.
> 
> ::) It needs a little refinement from the initial ideas JCL prompted, but
> :it looks good.
> 
> It still seems a little too simplified to do the job... but sufficient
> complexity kills the system. This leads to a system of special cases. I
> did start the same way you are working, but soon realized that the special
> cases made up all but three or four of my reactions - inorganic acid and
> inorganic base, in most cases, metal and metal alloy, in most cases, and a
> few rarer types. After that, I decided to make it case by case with
> inheritance.

Blech. I'm not planning on many exceptions at the moment, but I can
visualise that potentially happening. I'm trying to think of a way to put
in 'reaction modifiers' easily, to do it without explicitly stating the
reactions (ie, by creating chemical which react differently than they
should on a regular basis). Making it much more complex would probably
kill me, not just the system. ;)
 
> :> With these kinds of properties, do have any idea how _huge_ the list would
> :> get? (Um. All of the above qualify as "specialized" attributes, now that I
> :> think of it.)
> 
> :Frighteningly huge, which is why I'm going to use more general properties,
> :which determine the 'specific' properties as a sort of 'resultant' effect.
> :For instance, a good component for a fireball spell might be very volatile
> :(read: unstable), with high energies of combustion (burns well), and a
> :high magical capacitance (less 'earthly' and more connected to the flow of
> :magic, hence more likely to 'ignite' in the spell).
> 
> OK, this makes more sense. Alchemy, as opposed to chemistry, can be
> designed systematically. I did design one myself, in fact, for the GURU
> project, part of which was reflected in my posts on magical systems a bit
> back. Drugs, on the other hand, remain extremely difficult to mix in a
> believeable manner. (Alchemy, interestingly enough, is used to great
> effect in a simplistic manner in a certain "RPG" that squaresoft put out
> for the SNES console a couple years ago... can't recall the name off hand,
> but it featured a fantasy universe, a dog that kept shapeshifting with the
> setting.)

Heh. :) I think this system has the potential I want from it - perhaps
more interesting issues to delve into now are those pertaining to the user
interface; how to interchange ingredients between states, equipment, and
so forth.
 
> :> :Yup. Of course, you'd need many more properties tracked.. but still, we
> :> :have the basic spirit captured here. First things which came to mind were
> :> :properties to track reactivity of substances, acidity, and magical
> :> :capacitance. More general things with relevant to the mixing of
> :> :chemicals. A question rose subsequently here - what about by products? How
> :> :do we tell if a by product should be produced? I have yet to answer that
> :> :one.
> 
> :> I _do_ have ph, solubility in polar and nonpolar, state (crystal, liquid,
> :> gas, glass, and plasma), density, reactions (actually externally
> :> tracked... there is a pointer to every derivative, and the derivative
> :> backpoints to its components... most reactions require some trigger that
> :> looks to generate reactions, IE heat.), color, maleability, rebound, etc.
> :> Some of these only apply to solid states, of course.
> 
> :Naturally - I initially thought perhaps there would be an easy way to do
> :this (read: simple), then I realised, that for a good system with a degree
> :of external simplicity, I would have to get quite intensely complex
> :internally. Hence simple concepts like state tracking, and more complex
> :ones such as Ph, reactivity (generalised) and so forth. Colour is fun,
> :lots of nice bubbly liquids to play with (also the need to track
> :temperature).
> 
> Temperature is tracked not by the substance, which is a global
> info-object, but in each physical construct. Reaction temperatures are
> another story. Never finished coding reaction masses for radioactives, but
> I will, when they go in. Can do it softcode, if I need to, but its always
> nice to have something hardcode to inherit from.

Yup - I've start rewriting (again) the base of part of my mud, to cope
with material states, and to cope with ambient, and specific temperatures,
as well as hopefully some sort of abnormal atmosphere recognition (that
latter requires a lot of thought). The equivalent of hardcoding on an LP
is probably the base mudlib (I think Jon Lambert asserted nicely that you
have essentially three layers: Driver -> Mudlib -> Overlay eg areas, or
something of the sort), so putting in support for all this there, rather
than having the odd creator try to hack it into half a dozen of his rooms
is preferable.
 
> :> :It's easy to add in special cases once you have an established system,
> :> :almost trivial (some sort of basic db format seems in order, loaded at
> :> :runtime). Also, consider the states of compouds - mixing two solids
> :> :(powders) is hard. Or rather, you can mix them easily, but not chemically
> :> :combine them (unless they *really*really* react!). Of course, its not the
> :> :same with two liquids, and/or a liquid and a powder. Gases are pretty
> :> :tricky to react, too (without appropriate equipment).
> 
> :> Of course, there is the example of charcoal, saltpeter, and sulphur.
> 
> :Yup. Your classic exceptions. Flour is a good one, too.
> 
> No chemical reaction at room temperature there, is there? I meant the
> above producing gunpowder, not the flash burning common with flour.
> Gunpowder is a chemical, not a mixture.

Hmm, is it? I would have thought it was a finely divided mixture of the
three, not a chemically bonded compound?
 
> :> :Incidentally, bringing in the concept of tracking state produces a flaw in
> :> :the design of many stock (LP) bases - you have a drink inheritable, which
> :> :all drinkable substances must include, defining alchoholic properties etc
> :> :(this is pretty standard accross LP, excepting very different games). Of
> :> :course, this is not going to really work with liquids - in theory you can
> :> :drink any liquid, but you don't want to inherit drink into all of them!
> 
> :> So isn't a drink a solution of ethanol and something else? And therefore
> :> liquid state?
> 
> :Exactly the trail of thought I went along. I was mildly uncomfortable with
> :splitting objects into clear categories from the start - but initially (a
> :year ago) I set out to create 'just another LP mud' with some nice
> :widgets. The evolution since then is remarkable.
> 
> *grin* Same story, with a dikuoid from scratch.

It makes me wonder; how many of those here who are now producing pretty
dang unique games in one respect or another (and proudly so!), set out to
produce 'Just another XYZ..'?
 
> :> :Simple solution: Ditch the lame idea of a drink inheritable, and simply
> :> :make drinks chemicals with appropriate properties. This also allows the
> :> :use of common drinks (eg: water) in such reactions as formation of
> :> :solutions from powders, and dilution of solutions (and also brings in the
> :> :notion of concentration of solution). Excellent.
> 
> :> Quite. Well done.
> 
> :It allows for all sorts of fun things too! Particularly the notion of the
> :'mad alchemist' trying to create a magic potion to do something, and
> :gulping down all sorts of smoking, coloured liquids.
> 
> Shame mine is not humorous in nature, or I would be tempted to scatter
> man-to-frog transformations and such in the list of tangible-effect
> chemicals.

Heh, heh, heh. *evil glint*
 
> :> :Definitely. You can literally simulate the change in properties of
> :> :alchohols as you increase the length of the carbon chain (aka, add CH2 to
> :> :go up from Methanol to Ethanol, to Propanol and then Butanol, etc). The
> :> :effects are fairly subtle(ish), but mappable in this way. Woo.
> 
> :> Of course, this means ignoring the reality, or actually specifying the
> :> reaction.
> 
> :Well, yes, to be honest. :) I'm most of the way through a project on
> :capacitance (and organic di-electrics), written from a physics point of
> :view, with only a fairly naive amount of chemistry pulled in. It makes
> :assumptions about the length of carbon chains which I believe to be false
> :(as a chemist), but which present interesting concepts (leading to
> :something more close to life) when explored physically (onto polarisation
> :of molecules, and what is a plausible reason for the changes in behavior).
> 
> Heh. Should have seen the fit one of my solid-state profs pulled when I
> informed him that (from my experiences in the biomed labs) that was _not_
> a DNA chain he had isolated on the STM... physicists, in general, make
> poor chemists and poorer biologists. Not from lack of talent or knowledge,
> as I think most of my colleagues and seniors in the field are better than
> most of the ones I've dealt with in those other disciplines at _thinking_,
> and a bag of tricks can be looked up on a computer, but from an
> unwillingness to abandon simplifications even when they are inappropriate.
> Ah, well.

Yup, I have to agree. Good physicists seem to do relatively lousy at any
other science (its probably related to the mindset associated with
physics). Of course, there are those who are good all-round scientists,
but not 'above average' in any field. I have trouble remembering
everything I should learn chemistry-wise.
 
> :> :You could do special cases both by mutation of one or more properties, or
> :> :just by taking an effect 'out of the hat' and assigning it, so to speak
> :> :(for instance, a binary liquid, which is harmless on its own, but explodes
> :> :without explanation on contact with another similar liquid).
> 
> :> The reason I make these things _always_ specified is that I have almost
> :> never seen anything that wasn't an exception to logical rules in this
> :> arena.
> 
> :Heh. :) Well, luckily I don't really want to simulate RL chemistry - just
> :'A chemistry', which could quite conceivably be more logical, given the
> :world theme and history. With your Sci-fi (future of this world?) slant,
> :it might be a lot harder.
> 
> Try "impossible"

Impossible to do anything along the lines? No, impossible to realistically
recreate RL chemistry, I bet. ;) It depends to what depth you want it to
be believably real, I suppose.
 
> (have others tried it)
> 
> :> Something in the same continent, at least.
> 
> : :) About time this jungle was explored.
> 
> *hefts a machette* Well, you start on your side, and I'll start on mine,
> and maybe we'll meet in the middle.

Just remember to duck!
 
> :This is a good example of something with a lot to add to a mud if well
> :implemented (and nothing at all if done badly). I've seen badly done
> :alchemy systems once or twice before (only certain things could be mixed -
> :you could not just pick up an interesting rock, crush it to dust and throw
> :it into some viscous blue bubbly stuff in a jar).
> 
> Which is where the fun starts. Like randomly blasting a wall and spilling
> into a new area - anywhere in the game, as opposed to in the three rooms
> in a single area that have this feature coded for them. (though if you
> find a wall bordering on rather repititious territory, don't be _too_
> surprised. There's only so much you can do with a landscape generator.)

Ooh, nice.

[Snip]

Regards,
	-Matt Chatterley
	http://user.itl.net/~neddy/index.html
"Doublethink means the power of holding two contradictory beliefs in one's
	mind simultaneously, and accepting both of them." -George Orwell




More information about the mud-dev-archive mailing list