|
  
- 帖子
- 308
- UC
- 61
- 在线时间
- 860 小时
|
沙发
发表于 2007-8-14 14:08
| 只看该作者
terra0nova:
Hmm, nothing is stored with procedural generation - that's the beauty of it, cached, maybe, but not stored. (Of course, modifications a player makes will have to be stored somewhere, but that's another point - you don't need to store anything for the actual generation of the planet, as long as you have x and y coordinates and a procedure to determine if a planet exists at those coordinates). Basically, given the coordinates, a procedure (using some sort of algorithm based on those coordinates, most likely using some sort of psudo-random generator using those coordinates as a seed) will generate the planet whenever you need it. You might cache a planet while you are nearby it, in case you want to visit again (to save the regeneration time), but if you ever run out of space, you can always delete everything from the cache and regenerate only what you need to.
The big problem is speed of algorithms - if we want this game to be real time (it would probably begin generating planets before you got too close to them to give it a head start), but even so, these algorithms must be FAST and scalable (generate low detail first [the actual planet], then fill in more detail as you get closer [terrain details and cities]). I don't know the speed of those algorithms, but if they are doing anything too fancy, then they are too slow, as rivers are not of the utmost importance. Though the city one seems interesting - although we would probably want an algorithm more catered to larger, more futuristic cities.
CutterJohn
Consider:
Lets pretend this is our procedural engine:
X = 2y
Now, I'm going to give everyone here that little procedural engine of mine.
Got it?
K. Now, then... Y = 5(this is also know as the 'seed'). I want everyone to pull out their calculator and solve for X.
You all got 10, yes? If you didn't, get a new calculator.
Now, my 'procedural' engine is obviously a gross simplification, but the analogy still works. Procedural is really just fancy talk for a series of equations to reach a desired answer.
So then... every client in the game will have the same equations itucked away in the game somewhere. So, when they get the same seed, the equations(identical, remember) will output the same thing on everyones computer, just as you all got the same answer to my little question up above.
Introducing Procedural Generation
The definition of Procedural Generation can be found in Wikipedia:
http://en.wikipedia.org/wiki/Procedural_generation
I won't BS anything about the power of Procedural Generation since here is a great example - a game with the size of only 96kb. Guys, check it out:
http://212.202.219.162/kkrieger
However, don't limit your imagination of Procedural Generation to just a new game coding concept. This idea of procedural synthesis is profound - to automatize some somewhat intellectual yet repetitive work that is used to be done by human. To make it even more interesting, utilizing the power of automaticity, along with a set code/procedure one can generate something that is completely mind-blowing. The following article is about a game yet to be released, however it is much more than a game to me:
http://en.wikipedia.org/wiki/Spore_%28game%29
Enjoy |
|