
it seems that the Procedural Generation is the most important thing in the game!
how to understand it? is there any professional explanation about Procedural Generation?
thanks everybody!
While this is no professional explanation, I do believe I have a basic understanding of the concept behind it.
Firstly, IA describes it as such:
Procedural programming is a technique to let the computer generate the game universe on-the-fly, in real-time on request, rather than manually building everything. Because of this, the generated universe can be absolutely huge. In Infinity, billions of worlds, most of them never explored by any player, are awaiting the adventurous soul.
As I understand it, it is a form of computer programming that uses mathematical algorithms with certain variables to generate the content. I believe the variables are called "seeds". Different inputs will result in different outputs of the equation. If you are VERY unfamiliar with math, then I'll use a basic algebraic statement to describe it.
5 + x = y
If x = 1, then y = 6
If x = 5, then y= 10
For every X, there is a different Y, and therefore, a variable answer. I have come to understand procedural programming as just an immensely scaled-up version of that. Using that concept, the program for Infinity can generate worlds that are different from each other, simply because they use different sets of inputs to produce a different output.
Also, because the equations are essentially set in stone, then inputting the same seed each time will result in the same output every time. Therefore, the physical data of the universe does not have to be stored on your computer, while each system retains it's own set of unique qualities, based on it's seed.
But as I said, I'm no programmer. Just an ordinary admirer. If you're looking for more, then just wait for a Dev to answer, or use Google. Sorry if I give you any erroneous information.
Hi Freeman. I am not good with math. It hurts my head.
I think you know chinese writing more than english.
I cannot write english to describe this easy. I will try in simple words
A "Procedure" is a mathmatic formula that can be used to do something. Like draw a circle or a triangle or paint a circle or triangle. It can also be used to make complicated things. Make things like trees and planets and stars and even more complicated stuff. You can use a "procedure" to remember how stuff is supposed to look later. Now if you have something really complicated you might think that it would be hard to talk about. Math can do it easy though. It takes lots of computer work but it is easier to use math than to have someone make all the planets and stars and cities.
I could spend lots of time trying to draw a picture of a ball that looks like planet earth using a drawing program like Photoshop or 3dstudio. That will take a long time for me to do.
Instead of doing that, I can use a series of "procedures" that will create a ball, then fill it with all the islands and the water and air and even trees and animals if it was a very complicated "procedure". How can I do that? By making everything have a number. I can describe the color Red as a number like FF0000, I can describe a tree as a number and paint it with Green 0000FF
Once I make a "procedure" and I use the numbers correctly I will always make the same planet. Everything in the planet will always be where it was made to be. If I remember the numbers that tell me how to make the planet, I can tell it to you and now you can also make the same planet.
To make this short:
A procedure is a "mathmatic formula" that uses a stored or generated number to create something or tell what something is later. Think of it as a recipe about how to make something. If the number is the same and the formula is the same, then the thing we created will always be the same. If we change anything about the recipe then the thing we make will be different.
Note:
Everything in the universe could possibly made into a number. Maybe it's how the universe works. it only matters to the maker of the universe.
thank you very much! Magellanic & Delver
thanks for your particular explanation!
I look at procedural generation in a much broader context, basically 'everything' that is 'generated'. Lots of old skool demos made use of procedural algorhitms to show off some creative and artistic stuff cuz computers were so limited in power and memory. Also a number of games made use of this (particularly to create maps), midwinter, liberation etc. It's kind of magical if you can show off some nice results just by altering parameters.
Freeman. I hope you are able to find out a bit more information. Look into fractals because that is one of the earlier graphical representations of a procedural formula. It's all math which is way above my ability.
Getting a bit off the original question somehow I feel that the technique for this will become more and more important in the future. I postulated just a little in my last post.
Just what can be described? Just what can be created? What do we think is created? Imagine a universe (maybe only virtual for right now) that can be generated?
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.
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.
想象一下:
假如这就是我们的过程引擎:
X = 2y
那么现在我就向在座各位解释一下我的这个微型过程引擎。
请看,如果让Y = 5 (也就是所谓的‘seed’)。 每个人都拿出计算器来算一下X是多少。
都是10吧? 如果不是,去买个新的。。。
很明显,我的“过程”引擎是很简陋的,但依然是一个不错的类比。 其实所谓的“过程”就是一堆用来计算所需答案的神奇方程式组。
而游戏里的每一个客户端都内嵌了相同的方程式组。那么在给定同一个“seed”的情况下,这组方程式(完全一致的,记住)将在每一台电脑上输出一模一样的结果。这就好比你们计算如上所示的那个微型引擎必然得出相同结果一样。
| 欢迎光临 无限星辰:失落的地球 (http://www.infinity-game.com/bbs/) | Powered by Discuz! 7.2 |