What The Heck is a Fractal and How Does It Apply to Games?

Shamus Young

New member
Jul 7, 2008
3,247
0
0
What The Heck is a Fractal and How Does It Apply to Games?

Procedurally generated games have become increasingly popular of late, giving more use to the word "fractal." Shamus offers an explanation of the term and how it applies to these rogue-like games.

Read Full Article
 

Olas

Hello!
Dec 24, 2011
3,226
0
0
One way to make procedural generation more interesting (I'd imagine) is to allow multiple elements/variables to build on each other, thus increasing the diversity exponentially. The only problem with this is it can lead to unanticipated and often absurd creations.
 

RandV80

New member
Oct 1, 2009
1,507
0
0
I think what would really be great in this area is to integrate community support into the world generation. So the landscape is randomly generated, and pre-made 'landmarks' (towns, dungeons, sites, etc) are organically integrated into the generation. The developer creates a set of stock landmarks, and opens up the tool for the community to create there own to add to the stockpile.
 

Bad Jim

New member
Nov 1, 2010
1,763
0
0
I think interesting content would perhaps come with simulationist approach to procedural generation. You can have an algorithm make mountains, seas, rolling hills etc, and put trees and flowers on the landscape, but that sort of algorithm tends to always look the same.

In contrast, a weather/erosion/tectonic plate simulation of some sort might provide a lot more variety, albeit at a very high cost of running such a simulation. Our universe runs on fairly simple rules, yet it has huge variety.
 

Piorn

New member
Dec 26, 2007
1,097
0
0
The problem is hat humans can quickly get fed up with a pattern, even if it's infinite.
While those 16 minutes of Mandelbrot were great, nobody is going to watch hours upon hours of it. We reach a point where even if we discover something slightly different, we're so used to the pattern that we don't really care, and feel that we've seen it all before. Sure that loop might be a bit different, and beautiful in it's own right, but in the end loops are loops.
Same with planets. Maybe you see a differently shaped mountain, or a lake, or different trees, but at some point it's just one of many mountains, lakes and trees.
And increasing the complexity just prolongs that point. At some point the novelty wears off. And then what do you do?
Why do we play games in the first place?
 

Piorn

New member
Dec 26, 2007
1,097
0
0
RandV80 said:
I think what would really be great in this area is to integrate community support into the world generation. So the landscape is randomly generated, and pre-made 'landmarks' (towns, dungeons, sites, etc) are organically integrated into the generation. The developer creates a set of stock landmarks, and opens up the tool for the community to create there own to add to the stockpile.
Remember Spore? I can't believe how many ways there are to mold creatures into male genitalia. You have to admire people's "creativity" at least.
 

Maze1125

New member
Oct 14, 2008
1,679
0
0
So the title of this was "We're going to tell you what fractals are because people often get them confused." ("What the heck is a fractal?") and then immediately we get told that the article is going to do the exact opposite of that...

For anyone who actually cares what a fractal really is:
A fractal is a shape that has such infinite complexity that it starts to take on properties of a dimension higher than that used to create it. This means that these shapes have non-integer dimensions. (The term "fractal" refers to their fractional dimensions.)
For example the Koch snowflake [https://en.wikipedia.org/wiki/Koch_snowflake] is created from a 1-dimensional line but ultimately has a dimension of 1.2619
 

rofltehcat

New member
Jul 24, 2009
635
0
0
Piorn said:
RandV80 said:
I think what would really be great in this area is to integrate community support into the world generation. So the landscape is randomly generated, and pre-made 'landmarks' (towns, dungeons, sites, etc) are organically integrated into the generation. The developer creates a set of stock landmarks, and opens up the tool for the community to create there own to add to the stockpile.
Remember Spore? I can't believe how many ways there are to mold creatures into male genitalia. You have to admire people's "creativity" at least.
Spore had a lot of procedural generation... it felt very samey after a while though :(
 

Veylon

New member
Aug 15, 2008
1,626
0
0
Bad Jim said:
I think interesting content would perhaps come with simulationist approach to procedural generation. You can have an algorithm make mountains, seas, rolling hills etc, and put trees and flowers on the landscape, but that sort of algorithm tends to always look the same.

In contrast, a weather/erosion/tectonic plate simulation of some sort might provide a lot more variety, albeit at a very high cost of running such a simulation. Our universe runs on fairly simple rules, yet it has huge variety.
You can run different systems at different levels.

The topmost level might sketch out the continental plates and figure out the subduction/collision zones. You get a rough heightmap off of this. The next level sketches out wind/rain patterns and major rivers off of that. The next level down tells you the general biome status (Desert: 70%, Savanna: 30%). Then if you're zooming in on all this, the generator can throw down random features based on the type of terrain figured out above. It'll know what flora and fauna can be generated and the ratios of each. It'll know what weathers and temperatures are acceptable. It'll know where the terrain ought to lie on the smooth/jagged scale and which direction streams run.

Importantly, should you be moving around, the random terrain will gradually produce different random terrain as you travel to different biomes. If you're coming in from the desert, the cacti will get generated less and less often and you'll start to see shrubs and eventually grass.

Maybe more importantly, the expensive continental plate and rain shadow stuff only has to be done once. After that, what it generated just sits in memory or on the disk, waiting to be called up as inputs to the local terrain.
 

Shamanic Rhythm

New member
Dec 6, 2009
1,653
0
0
Maze1125 said:
So the title of this was "We're going to tell you what fractals are because people often get them confused." ("What the heck is a fractal?") and then immediately we get told that the article is going to do the exact opposite of that...

For anyone who actually cares what a fractal really is:
A fractal is a shape that has such infinite complexity that it starts to take on properties of a dimension higher than that used to create it. This means that these shapes have non-integer dimensions. (The term "fractal" refers to their fractional dimensions.)
For example the Koch snowflake [https://en.wikipedia.org/wiki/Koch_snowflake] is created from a 1-dimensional line but ultimately has a dimension of 1.2619
Yep.

What the article also doesn't mention is that terrain modelling is often done using fractal geometry because trees, mountains, coastlines, river systems all exhibit fractal like patterns, although they're rougher than the examples like the Mandelbrot set or the Koch Snowflake. For instance, a mountain can be drawn by starting with a triangle and breaking it down into smaller triangles as per Samus' example. But because this is taking place in 3d as opposed to just on paper, if those smaller patterns are rotated slightly by random, it creates an effect of terrain fluctuating that mimics natural patterns.

What makes this relevant to procedurally generated content is that the equations used to define the fractal patterns respond to a related brach of mathematics commonly known as the 'butterfly effect': that is, changing the initial condition even slightly leads to dramatically different output. This allows programmers to generate random content across a broad area without having obvious repetition at a macro level. For instance, two mountains in Minecraft that are right next to each other in-game might look quite different to the eye, but the random values that are put into the equation that generates them might only be separated by the tiniest of values.

This is arguably the coolest thing about fractals and chaos theory: a complex system can be randomised using a single value. An entire Minecraft map can be recreated for someone else provided they have the same seed. The underlying equations will respond exactly the same.
 

Rack

New member
Jan 18, 2008
1,379
0
0
ravenshrike said:
You mention the Mandlebrot set and don't toss a link to the best song about it? For shame.

Well, that song is really about the Julia set but it's still about fractals.
 

kurokotetsu

Proud Master
Sep 17, 2008
428
0
0
Maze1125 said:
So the title of this was "We're going to tell you what fractals are because people often get them confused." ("What the heck is a fractal?") and then immediately we get told that the article is going to do the exact opposite of that...

For anyone who actually cares what a fractal really is:
A fractal is a shape that has such infinite complexity that it starts to take on properties of a dimension higher than that used to create it. This means that these shapes have non-integer dimensions. (The term "fractal" refers to their fractional dimensions.)
For example the Koch snowflake [https://en.wikipedia.org/wiki/Koch_snowflake] is created from a 1-dimensional line but ultimately has a dimension of 1.2619
There is more to fractals than fractal dimension (and is teh Haussdorf dimension, which is different form the concept in Topology, although related, and in Linear Algebra), also a concept I've never seen before is that of "taking properties of higher dimension", although it may be similar to a Möbious Strip, which is more easily studied in more dimensions if that is what you mean.. A fractal's infinite complexity is also nowhere mentioned in the definitions I've seen although poopular in the lingo. What is part is that there are "self-similar" which I didn't see in the article (shame Shamous important property of fractals) and nowhere differentiable. Those are important and can be described wihtou much problem.

Also fractal may be because of the dimension but also I've seen this quote form The fractal gemoetry of Nature by mandelbrot which may influence the inception fo the term

"a rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole"
 

gridsleep

New member
Sep 27, 2008
299
0
0
Wow, that was the maximum amount of blah-blah with the least amount of content I have seen in an article on anything since the last advertising pamphlet I tossed on the pile. Not one mention of fractional dimension which is the heart of fractal mathematics. Most of the article dwelt on self-similarity which is an effect of fractional dimensionality in the way that lensing is an effect of gravitation but is hardly an explanation of it. I have been studying this stuff for thirty years and I applaud how this article basically explains how little fractal mathematics has to do with actual game generation by having as little to do with fractal mathematics as possible. It is like explaining how sailing has nothing to do with the desert by writing an article that has nothing to do with sand except that it sometimes flows like water.