One could take the Dwarf Fortress mechanism of generating a complete history and take it to the extreme: simulate the formation of entire solar systems based on seed values that effect randomly generated planetary masses (and resulting gravity), atmosphere, tectonic events, ice ages, warming periods that carve valleys/lakes/rivers into the landscape, biological events influencing the creation of life based on the planet's properties and the landscape, insect swarms that ravage an area, and so on. Simulate meteor impacts which might destroy life, visits from alien species, etc. Then simulate the effects of any emergent properties on the landscape. So instead of:
p(tree_goes_here) > random()
And then randomly placing various tree models according to the RNG output, your random events produce a story. You should be able to look at a series of mountains and trace it back to tectonic events, then if one mountain has a patch of trees missing, you should be able to see that there were various events that either removed the trees (eg: some local civilization) or a Tunguska-like meteor strike cleared a path and made the soil infertile for growing more trees.
If one did this, such a game would have value not only from the game itself but it might open up a whole subculture of archaeologists who go from planet to planet studying the evidence to piece together the events that led to the planet's present state.
Otherwise, you're right. Each world would end up being different much in the same way that listening to static noise is different each time you hear it.
Playing devil's advocate, I think this is a dangerous road to go down. I'm in my second year of making a procedural game, and I think the existential danger involved is that of making a game that's more interesting to develop than it is to play.
That is, it's more challenging and rewarding to me to simulate tectonic movement than it is to generate terrain from random noise and tweak it until it feels okay. But the important question is, is the game noticeably more interesting either way? Do mountains affect gameplay in a way that gets more compelling if they're placed according to tectonic movement?
There are certainly games where the answer is yes, but there are a hell of a lot more where it isn't. And if your game is one of the latter, then complicated simulations are a dangerous trap - not only do you waste time, you also hinder yourself by making your game's content harder to tune (in that you can't just, say, make the mountains 30% higher if mountain height is determined by a complicated process).
Introversion (creators of Prison Architect, Uplink, Darwinia and Defcon) made this mistake with their cancelled game "Subversion". They started creating elaborate mechanisms and procedurally generated cities only to realize that the entire intricate "bank heist" missions could basically be solved by shooting people and taking their keys.
IOW, they tried so hard to make the game realistic that the intended gameplay was no longer enforceable. Setting up all these intricate puzzles and writing the procedural generators was fun, but actually playing the game was immensely dull unless you went out of your way not to take the path of least resistance.
They ended up using some of the lessons learned in Prison Architect by making the "level design" the actual gameplay. There's actually a very interesting presentation of how Subversion was intended to be played versus how it would have actually been played somewhere on YouTube.
As a counterpoint, RimWorld is a game that's largely based on procedurally generated worlds with heavy inspiration from Dwarf Fortress. But the entire premise of the game is that you build a colony which the game tries to actively challenge to create an interesting story for you.
IOW, they tried so hard to make the game realistic that the intended gameplay was no longer enforceable
Realism is sometimes a misguided goal. Games are media, just like movies. What you want most of the time isn't realism, but an impression of realism. Robert Crumb and his son sometimes do "realistic" portraits, but in the biographical movie about Crumb, he reveals that his "realistic" portraits actually contain very subtle elements of caricature, to draw the user's attention to the most interesting aspects of the subject's face.
Contrast this with films of war vs. actual war. Head-cam movies of modern soldiers in combat look like people in battle gear taking cover while yelling at each other about people you can't see or barely see, then calling in air support. There's nothing cinematic or easily parseable by the viewer. If you're on a modern battlefield, and you're posing for the cameras in a nicely composed scene laid out by the "Rule of Three" you're likely to get shot in the very next second.
Documentaries and action films are very different things. Both of those are very different from documentary-styled fictional films. Analogies to sandboxes, various other game genres, and sandboxy games apply.
Games are simplified, stylized reality e.g. chess is war. So are some fps: using real locations as maps isn't as much fun as carefully balanced maps, taking sightlines into account, chokepoints, with interesting and complex strengths and vulnerabilities of positions within each section, and all sections close to each other.
Similar to fiction: it's more dramatic and makes more sense than ordinary life.
A simulation is akin to a tech demo, which can be impressive, but usually isn't a game.
Switching gears, I'm interested in how you've done tectonics. I was thinking of doing it as a magma fluid simulation (very slow, only one timestep every few hundred frames) and using convection to move and rotate plates.... though it turns out, the cause of tectonic movement isn't nearly that well understood. My concern is that using a fixed direction/speed will eventually mess up the world. If tectonics really are governed by convection, movement must change at the end of that magma cycle. Maybe a bit over the top! How are you doing tectonics?
One (expensive) solution to the 30% mountain height problem is monte carlo: rerun the simulation til it fits the parameters. What's nice is that you don't distort the generation probabilities, apart from the explicit constraint. Of course, not plausible for very unlikely constraints, esp. combinations thereof!
If you just want the end-produce (not an ongoing, evolving world like mine), some people have used a more declarative approach. e.g. Instead of generating rivers by waterflow and erosion over a terrain, you can generate a hierarchy of rivers and tributaries first, work out the watersheds implied, then generate the terrain based on that constraint.
I'm not doing any tectonics. Sorry if I was unclear, I meant it would be an interesting challenge, but in my game it doesn't make sense to worry about, because one doesn't interact with the world at a scale where you notice how the mountains are laid out.
At a more fundamental level though, doing evolutionary-type stuff in a procedural world is a problem I'm wrestling with. I'm running an infinite world that's generated one chunk at a time, like Minecraft, so you can't, say, "start by generating all the rivers, and then...". Obviously this means everything has to be deterministic, but also it means that whatever macro-sized calculations I do need to be re-done for each chunk, or else cached somehow, etc.
I've looked for articles on such things but not had much luck. Maybe others here have approaches they've tried?
I think you might be able to solve this with certain level of laziness, at a cost that you would sometimes need to generate more than just a single chunk.
I.e. once you encounter a river, you will then generate the whole river, from source, to sink (either you have a sea, or some other already existing, but undiscovered river?)
You would then need to account for 3 states of your world:
a) blank canvas
b) pre-generated but yet unexplored terain
c) already explored terain
The world in state b) would then be the one both cached and available for re-calculating :-)
If I were you I would read up on pen&paper sandbox designs, i.e. Stars Without Number [1] relies on lots of random tables to generate a sector of space with different factions/tech-levels/ecosystems, combined with rules for faction interaction. This gives it a nice "I am just a small ship in a big universe" feel :) You can generate example sector [2]
Perhaps you could try a multi-resolution chunk system - LoD for chunks.
For large scale features like rivers, generate those at coarse resolution on very large chunks. When generating the detailed chunks, take input from the coarser resolution levels which overlap the same spatial region, and add fine scale detail.
A couple of levels of detail might suffice in practice, but if you want to go crazy you can more or less make as many as you like: As long as each level is downscaled by at least some constant factor of the more detailed level below it, you'll only have O(log(N)) overhead for O(N) chunks which is small even for very large N.
Compare mipmapping, which is more or less the opposite of this process.
> Do mountains affect gameplay in a way that gets more compelling if they're placed according to tectonic movement?
One of the supposed problems with No Man's Sky is planetary isotropy (uniformity at a global scale, variation only on a local level). They're all single biomes and once you've seen the local area, you might as well find another planet. But you're right: I don't know that people would be any more impressed with planets if they were more 'realistic' in regards to geomorphology.
imo its not the rules of reality that specifically matter in a game; its that there are rules at all, and that they're interesting ones. Emulating reality is just an "easy" way to achieve that.
Games are inherently a challenge to learn, understand, and best an instantiated mini-universe.
when the universe follows simply-governed rules, then of course there's little for the player to do; he wins by understanding, and understanding simple things is, well, simple.
And ofc, the internal rules can very well be trivial to implement. Its the rules to from the players viewpoint that matter.
And vice versa; the engine could be infinitely complex, but if all it does is spawn the same mountain repeatedly, then there's not much left once the player bests the first.
To add to my own comment a bit, fundamentally I think this boils down to randomness vs. hidden state. It feels very "emergent" for a game to have lots of subtly interconnected systems, but if they depend on factors the player doesn't know about, or depend in ways the player can't possibly intuit, then they're indistinguishable from randomness, so you might as well have flipped a coin.
For me the canonical example of this is Nethack, which is full of such things - monsters that are slightly more dangerous during a (real-life) full moon, and so on. One can argue that NH is a special case, with its rich tradition of players reading the source code as they play, but in general I think it's an anti-pattern for game developers to beware.
I'm in my second year of making a procedural game, and I think the existential danger involved is that of making a game that's more interesting to develop than it is to play.
I think the key comes down to basics: Games are media. One of the key attributes of great media is a focus on the audience experience. So if you're going to spend a lot of effort on procedural generation, then this procedural generation had better be "paying rent" commensurate to the resources taken up by it.
If your game is about tactical improvisation and combat, then the procedural generation should be directly contributing to enhancing those experiences; therefore tweak the statistical properties of procedurally generated tactically useful things to enhance the user experience. Likewise if your game is about survival, or managing resources, or what have you.
If your game is about viewing scenery, then good luck to you. People will get "remix boredom." Furthermore, if you've sunk all this energy into producing "interesting" to view scenery, then people are let down by your tactics and combat -- well go figure!
Awhile back, I wrote a library[1] to wrap a hex grid around a sphere (technically, there are 12 pentagons so it isn't a true hex grid, but close enough) and perturbed the elevation via perlin noise and then wrote some cellular automata-type vegetation simulations.
Several types of plants would grow, and randomly catch on fire and burn half the planet to the ground, and so on. I had a primitive water cycle, too; water flows to low points or gets absorbed by plants or evaporates. When plants burn, they release their moisture into the air, which rains back down on the ground. It's interesting how small changes to the cellular automata logic can cause major changes in emergent behavior.
That was a very fun experience and I could imagine it being the basis of a game. And being a finite world (unlike Minecraft's practically infinite expanse) it's computationally tractable to simulate a complete ecosystem that's constantly changing; even the parts you haven't explored yet.
You've given me flashbacks to SimEarth, which I spend a good deal of time playing with as a kid. It was a weird "game", but a modern version I could play on current hardware would be a lot of fun, I think.
One could take the Dwarf Fortress mechanism of generating a complete history and take it to the extreme
I'm going to do something like this, but for one specific class of enemies: The dire "it's time to do your best to survive" encounter. Specifically, I'm going to see if I can't use genetic algorithms to evolve "kill the crap out of the player" combat groups. You can't write a fitness function for fun or player involvement. But you can write a fitness function for "kill the crap out of a player" -- even equalized for level. So the trick is to hand-balance the timing/opportunities for a player to encounter the dire situation.
I'm going to let players post-mortem the genetic algorithm tuned AIs and ship/item configurations. So instead of archaeologists, there would be hackers and xenobiologists.
Random brainstorm: Introduce a Dark Souls type async-community aspect: Players can come across the wrecks/corpses of other players and are rewarded somehow for figuring out what happened and why; their analysis becomes feedback/evaluation function output.
Do you mean that the detective player's analysis would be, say, an input to the fitness functions of a genetic algorithm? That sounds super interesting. Would you care to elaborate on what form the analysis would take, in order to be both parsable by the system and writable by a player?
I have an idea for a fairly simple possibly: The user just declares that certain features of the scene are interesting and relevant, maybe by "taking a sample", so that the algorithm can boost the weight of inputs that have a relationship to those features. But, I suspect that you have something much more interesting in mind...
So the question is how to complete the feedback loop. The Adversary needs something causally coupled to its victory or defeat that it can use to improve its monsters.
I think that the most straightforward way to do this is to have the Archaeologist player indicate features of the combatants or the scenario that led to victory/defeat, like you said. The Adversary then uses those to guide its optimizer. For example, you might indicate something like "The Monster won because: Monster had high armor, Player had low jump height, this platform in the middle of the room". The system then knows to put those features together more often.
Hmm, now that I think about it, there's actually a metagame issue here: Players will tend to support each other by trashing the AI. It'd be more effective to set players against each other somehow. Or we need a better way to reward players.
So what we want to do is tie the monster's success to the player's success. A simple answer is "I want this": The player gets to choose something to take from the monster's ship and add to their own. The Adversary might be able to use that somehow, but there's a little bit of a mismatch there because the player's ship and style will be different than the monster's, and a feature might be selected to shore up something about the player's ship rather than to point out a useful bit of the monster.
Maybe have the investigator player redo the fight with tweaks. The player's job might be to change the monster until it loses a rematch. Could do this by having the player take over the past player's ship and fight "in simulation", or could just do it automatically. Player gets a better reward the less they have to change the enemy to win, which encourages efficient changes. The Adversary then changes the monster in the opposite direction and sends it back out.
Could split things up into teams and set players against each other on a grand scale? The player's job is to find battlefields where their team's monsters lost and then optimize the allied monsters. You never actually see another player - might do something asymmetric here, with a dimensional boundary or something that prevents players from interacting with other players except via salvaged guncam footage from allied monsters.
Maybe have the investigator player redo the fight with tweaks.
Now that I've had some hours to think, this'd actually work better in a single-player format: The player can only advance by tweaking enemies until they can defeat them, knowing that the next time they encounter that enemy it'll be stronger in exactly the wrong way. Then it becomes a complex game of managing how the enemies grow and balancing tactical concerns ("how do I beat this one enemy") versus strategic concerns ("I could beat this one by decrementing its dex, but then it'd be unstoppable in the future.").
EDIT: this feels a little bit like "warning forever" but maybe with more depth and a clearer focus?
So what we want to do is tie the monster's success to the player's success.
One thing I've played with is to let Players take "contracts" to build security drone warships. The players will get paid a small royalty, plus a sizeable bonus for combat success.
To keep players from trying to rig the system in their favor too easily, the AI scripting language can be processed by the genetic algorithm. The players will still be able to exploit the system by nefarious means, but they will have to create bots that are tough on the surface, and hope that not too many others will discover and also exploit their backdoors. (I would love it if players started doing this!)
That's pretty neat! Reminds me a little bit of the old terrarium game that microsoft used to demonstrate .NET, or maybe of a version of spore that doesn't suck, or even a little bit of the nature of open-source: build something, send it out into the world, see it grow and develop from where you started it.
Genius nefarious builds could definitely be flavored as a reward, and I agree that that's one of the big draws of this system: if you manage to build something that's good enough to survive and spread but still flawed in a way that you can exploit, kudos to you! Reward: you get to break into anything that's guarded by your creations. :P Just good luck building something that you can exploit that not enough other people can for it to not succeed.
(I think I'd love to check this game out when it's further along, BTW. Do you have a news list I could throw an email address at?)
Actually, I have ship corpses right now. All I have to do is to make them persistent past the player "logging out." Of course, this seems rife for griefing.
"Reassembly" does this well-- you build ships with prices for every component and roam the galaxy, fighting a variety of built-in and player-created enemy ships.
Getting destroyed encourages you to try new tactics to counter the superior designs and build more efficiently.
Have you ever heard of 'space engine'[0]? It is not a game, more something like static a simulation. But the generation of random planets works kind of like you just described. There are no rocks or living objects on the surface (yet) but I think the generated geography is pretty and rich in features.
If one did this, such a game would have value not only from the game itself but it might open up a whole subculture of archaeologists who go from planet to planet studying the evidence to piece together the events that led to the planet's present state.
Otherwise, you're right. Each world would end up being different much in the same way that listening to static noise is different each time you hear it.