Alex Rivera | Logout

Mathematical question: procedural generation of a galaxy

Asked 2008-12-07T23:32:51.787
44

I'm going to make a space/trading/combat game that is completely procedurally generated. But, I know that storing all of the details of the whole galaxy in memory is unfeasable. As a result, I've been think that I can use a seed to generate a solar system, and from that solar system, you can use jumpgates to travel to other solar systems. The problem is that if I jump to another solar system from the starting one, I need to be able to get back to the exact same starting solar system with the exact the same features (planets, asteroids, etc.).

Essentially, I need to be able to generate a whole galaxy from one number. And from that one number, which generates one solar system, I need to be able to generate all of the other solar systems that link from the first one and all of the solar systems that link from those, and so on. And each solar system has to stay exactly the same feature-wise, if I return to them. Also, the number of links from each solar system can be either random, or fixed, your choice. Random would be better though.

Edit
Report

3 Answers

0

I can vaguely recall this being done before. During the early 90's fractals were all the rage and I remember one company offering worlds to game programmers. The had created a whole infinite universe full of galaxies with suns and planets, event down to the valleys and textures of places on the planets. They were offering to find suitable virtual real estate to game developers. The game developers would get the software to render and use this, together with the exact coordinates to their propery in this fractal universe.

I've googled for a few minutes for "fractal game world planet universe" and such, but haven't found them. It might have been Pandromeda, but I can't quite remember.

You should study fractals for this idea. All you need is a continous field of numbers that you can recreate from a seed and then present those numbers as stars, planets and satellites with different properties.

answered 2008-12-08T00:01:51.400
0

If you use a pseudo random number generator, you can guarantee that each random number you generate will appear in the same order from a given seed. The code to generate a system seeded by a given number will appear the same each time you generate it.

Use the first number from the pseudo random number stream to generate the number of "gates". Go through each gate and get a value from the number stream to assign to and seed each target system.

Generate the featurs of each system based on that seed.

There are several known algorithms for generating random seeds.

Give the Mersenne twister a crack

answered 2008-12-08T01:57:19.250
0

I suspect the biggest problem you're going to face is having a naming system to name all these objects in a way that's consistent and meaningful to the player -- although we do have schemes for naming real objects systematically. I forget whether Elite's naming convention broke down after a certain point ...

answered 2010-12-03T09:28:43.440

Your Answer