Looking for procedural game design

Started by
25 comments, last by PrestoChung 13 years, 2 months ago


This is an issue where my brain is really stuck right now. I've managed to generate a world that looks great from a distance, but as I zoom in the borders in between the tiles form straight edges etc. Could you describe more on how one can zoom into some kind noise function and genereate the noise there with a better "resolution"?


Doggolainen,
Zooming in and out just becomes a matter of showing (or generating) more detail (finer sampling) close to the camera. This is a sort of LOD problem.

With the terrain I generated I used a geometry clipmap similar to this [size=1]http://research.microsoft.com/en-us/um/people/hoppe/proj/geomclipmap/
Advertisement

[quote name='Doggolainen' timestamp='1296734388' post='4768972']
This is an issue where my brain is really stuck right now. I've managed to generate a world that looks great from a distance, but as I zoom in the borders in between the tiles form straight edges etc. Could you describe more on how one can zoom into some kind noise function and genereate the noise there with a better "resolution"?


Doggolainen,
Zooming in and out just becomes a matter of showing (or generating) more detail (finer sampling) close to the camera. This is a sort of LOD problem.

With the terrain I generated I used a geometry clipmap similar to this [size="1"]http://research.micr...oj/geomclipmap/
[/quote]


Yes, generating a higher resolution on one tile is easy. But making it seamless to the tile next to it is the issue Im stuck on.


Yes, generating a higher resolution on one tile is easy. But making it seamless to the tile next to it is the issue Im stuck on.




Sample one tile from the area of the domain defined by, say, (0,0)->(1,1). Then, its neighbor to the north will be sampled from the area defined by (0,-1)->(1,0), it's neighbor to the south will be sampled from the region (0,1)->(1,2), and so forth. Given that you can build a Perlin noise function that is continuous out to infinity (or at least as far out as your platform's float or double types can go), it shouldn't be a problem to build a nearly infinite procedural world in this way and have the sub-regions you sample line up with one another. If you are doing this correctly and you are still getting sharp edges, you might look into how you are sampling the regions and ensure that when the function is actually mapped to a chunk of data, that the border areas are getting sampled correctly and that you are not accidentally jumping over or duplicating a "row" or "column" of data.
[font="Book Antiqua"]I just noticed this thread, skimmed through it quickly, and have a couple comments to make. Hopefully I'm not repeating or contradicting other advice that I may have missed in my skim. BTW, I am creating a 3D simulation/graphics/game engine with a top priority to support "procedurally generated content". This includes creation, assembly, manipulation and destruction of pretty much everything, including shape, object, sound, voice, etc. If anyone is interested in joining such a project, especially to take on research and implementation of one or more subsystems, please contact me via gamedev personal messages and then we can switch to private email and/or messengers.

First, regarding issues like the intersection of things like "mountains, rivers and cities", the approach I decided to take (still entirely on paper) is to consider (and follow) the natural flow of processes. In other words, galaxies come first (if relevant), then solar systems, then planets, then continents (sorta), then mountains, then rivers that erode the mountains and create, then etch, then partially fill the valleys, then cities, etc.

By following the natural order entities form, you never run into wacky situations... like having a city and then trying to run a river through it.

Another observation. It seems best to literally design the algorithms and code for each kind of object (office buildings, homes, roads, cars, tables, chairs, windows, etc). There is just too much "historical accident" involved in every kind of existent to have a generalized routine that invents whole new worlds and devices and processes from scratch (without even knowing the characteristics of real, existing materials they must be made from). Once you do this in a general way... meaning the functions that create the objects take lots of arguments to hint or specify many different characteristics of the existent... you find that many fundamental and general support functions become necessary to serve those specific-purpose functions.

Someone asked about noise-like randomizing functions (that generate values between -1.000 and +1.000). I wrote 1D, 2D, 3D, 4D versions of functions like that, which I'm willing to share for research, learning and experimentation. They are akin to "simplex" noise, which is somewhat similar to perlin noise except also has a continuous second derivative whereas perlin is continuous only in the first derivative. Like all similar functions that are useful for procedurally generated content, these are repeatable functions.[/font]

[font="Book Antiqua"]First, regarding issues like the intersection of things like "mountains, rivers and cities", the approach I decided to take (still entirely on paper) is to consider (and follow) the natural flow of processes. In other words, galaxies come first (if relevant), then solar systems, then planets, then continents (sorta), then mountains, then rivers that erode the mountains and create, then etch, then partially fill the valleys, then cities, etc.

By following the natural order entities form, you never run into wacky situations... like having a city and then trying to run a river through it.
[/font]


This idea is definitely attractive on paper, and certainly appeals to the computer scientist in all of us, but it's pretty much just the age-old trade-off of simulating it vs. faking it. We'd all like to build accurate models of our systems, but from a practical standpoint it is not possible to go that deep. Just look at the processing work involved in performing accurate fluid simulations to see how much computation the "simulate everything" approach requires. Some of those simulations can take hours, for relatively small-scale tasks. Not to mention the daunting complexity of building the rules of the simulation in the first place, or the huge sink of time spent iterating, testing and debugging such an overwhelmingly complex system. At some point you are going to have to fake it, and where you draw that line is a decision that you should base on your goals for the game. What makes the game fun? A completely realistic simulation is only fun from an academic standpoint, and not necessarily from a gameplay standpoint. Is it physically accurate that most game worlds are only at most a few "real" kilometers in size? Nope, not according to the laws and dynamics of celestial objects. The planet should be much bigger than that. But trying to provide a virtual world that is every bit as large as the real world, with all of the vast stretches of boring and non-plot-related landscape, is probably not appropriate for most games. This is the reason that there are so many Hangar levels in shooter games that are not structured at all like real aircraft hangars, why there are so many fortresses that are not structured at all like a fortress in the real world, etc... The spaces we play in are built for play, not for realism, and every level that you provide for the player must live according to that rule.

Some may argue otherwise, but realistically our goal as game developers is not to provide an environment that is authentic from a physical modeling standpoint, but to provide one that is fun to play in.

[quote name='maxgpgpu' timestamp='1296858576' post='4769752']
[font="Book Antiqua"]First, regarding issues like the intersection of things like "mountains, rivers and cities", the approach I decided to take (still entirely on paper) is to consider (and follow) the natural flow of processes. In other words, galaxies come first (if relevant), then solar systems, then planets, then continents (sorta), then mountains, then rivers that erode the mountains and create, then etch, then partially fill the valleys, then cities, etc.

By following the natural order entities form, you never run into wacky situations... like having a city and then trying to run a river through it.
[/font]


This idea is definitely attractive on paper, and certainly appeals to the computer scientist in all of us, but it's pretty much just the age-old trade-off of simulating it vs. faking it. We'd all like to build accurate models of our systems, but from a practical standpoint it is not possible to go that deep. Just look at the processing work involved in performing accurate fluid simulations to see how much computation the "simulate everything" approach requires. Some of those simulations can take hours, for relatively small-scale tasks. Not to mention the daunting complexity of building the rules of the simulation in the first place, or the huge sink of time spent iterating, testing and debugging such an overwhelmingly complex system. At some point you are going to have to fake it, and where you draw that line is a decision that you should base on your goals for the game. What makes the game fun? A completely realistic simulation is only fun from an academic standpoint, and not necessarily from a gameplay standpoint. Is it physically accurate that most game worlds are only at most a few "real" kilometers in size? Nope, not according to the laws and dynamics of celestial objects. The planet should be much bigger than that. But trying to provide a virtual world that is every bit as large as the real world, with all of the vast stretches of boring and non-plot-related landscape, is probably not appropriate for most games. This is the reason that there are so many Hangar levels in shooter games that are not structured at all like real aircraft hangars, why there are so many fortresses that are not structured at all like a fortress in the real world, etc... The spaces we play in are built for play, not for realism, and every level that you provide for the player must live according to that rule.

Some may argue otherwise, but realistically our goal as game developers is not to provide an environment that is authentic from a physical modeling standpoint, but to provide one that is fun to play in.
[/quote]
[font="Book Antiqua"]You are taking my intent much further than I intend. I'm totally fine with faking how the mountains arise, faking how the erosion takes place, faking the path of rivers and so forth (to make them happen instantly if necessary). I'm only retaining the order in which things happen.

And I'm not saying you must start at the scale of the universe in order to decide how to subdivide a building into rooms or something. Nothing could be further from the truth.[/font]


This idea is definitely attractive on paper, and certainly appeals to the computer scientist in all of us, but it's pretty much just the age-old trade-off of simulating it vs. faking it. We'd all like to build accurate models of our systems, but from a practical standpoint it is not possible to go that deep. Just look at the processing work involved in performing accurate fluid simulations to see how much computation the "simulate everything" approach requires. Some of those simulations can take hours, for relatively small-scale tasks. Not to mention the daunting complexity of building the rules of the simulation in the first place, or the huge sink of time spent iterating, testing and debugging such an overwhelmingly complex system. At some point you are going to have to fake it, and where you draw that line is a decision that you should base on your goals for the game. What makes the game fun? A completely realistic simulation is only fun from an academic standpoint, and not necessarily from a gameplay standpoint. Is it physically accurate that most game worlds are only at most a few "real" kilometers in size? Nope, not according to the laws and dynamics of celestial objects. The planet should be much bigger than that. But trying to provide a virtual world that is every bit as large as the real world, with all of the vast stretches of boring and non-plot-related landscape, is probably not appropriate for most games. This is the reason that there are so many Hangar levels in shooter games that are not structured at all like real aircraft hangars, why there are so many fortresses that are not structured at all like a fortress in the real world, etc... The spaces we play in are built for play, not for realism, and every level that you provide for the player must live according to that rule.

Some may argue otherwise, but realistically our goal as game developers is not to provide an environment that is authentic from a physical modeling standpoint, but to provide one that is fun to play in.


There is some truth to what you say but a couple points:
-Games don't have to have 'plots'
-Part of entertainment is suspension of disbelief or 'immersion'.

It might depend on the person but it can ruin an experience for some when the game environment is too obviously a 'game'. This leads to a) designing for how the player might think and B) playing the game keeping in mind how the designer was thinking. It can be very annoying to be reminded of these things while playing.

The other benefits of procedural environments are the opportunities for emergent behavior. You have the ability at your disposal to create arbitrary combinations of components which can interact and give rise to unique gameplay situations.

It's really up to the implementer to be able to fine tune and integrate enough levels of detail to prevent things from becoming too monotonous or sparse.

This topic is closed to new replies.

Advertisement