Quote:Original post by ApochPiQ I like the Myst concept of world-writing, but I think for a game that may be beyond reach. Natural language processing is still fairly limited in its ability to interpret the subtleties and connotations of imaginative writing.
|
This seems to be a relatively common complaint against this idea. However, you don't need intelligent processing, you need something that looks intelligent. Special effects in movies, plays, and magic tricks almost always turn out to be horribly mundane when you see how they were done.
The basic implementation I'm picturing goes something like this. Create a two dimensional array, each element representing a square of the level's surface. Each element will have several properties in the range of 0 to 1 (or UCHAR_MAX, or whatever).
The language will define sources for the various properties. Perhaps the east symbol will place a source in the east (from some arbitrary, but constant, orientation) with some pseudo-random jitter (so it's deterministic but not predictable, if you get my meaning) and perhaps pulled a bit north by a relatively nearby north symbol. If the symbol is blue, we'll increase the water property of the surounding areas (perhaps decreasing with an inverse square law with distance). If a "flat" symbol is near this blue east symbol, we'll also make the east symbol decrease some elevation fluctuation property to give the water a flatter bottom (the strength of the flattness effect will depend on the distance between the two symbols).
Now, we feed this information into some algorithm (I'm not an expert on terrain generation so I'll let them decide on this part of the implementation, but, knowing statistics and a very little about fractals, I can imagine some parts of the implementation already).