Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Ideas and Projects
#1

Idea for large game worlds (2000 times the size of our solar system)

Archive: 12 posts


I've been thinking about how to get around LBP2's limited level space and file size. I'm thinking specifically about 2D tile-based games.

Some kind of procedural generation seems to be the answer, which solves the problem of thermo. The player remains physically static and the world is generated and destroyed off-screen as it travels around them, which solves the problem of limited level space.

The only constant in this world is the player's virtual position along the x and y axis, so I think all methods of terrain generation would have to be based off that.

Generating the terrain from the player's position relative to the x and y axis should result in a coherent world even if the player decides to revisit a location. I'm guessing something like a river could be treated like graphing a function but I'm struggling to think how you would plot that for a specific range represented by the borders of the player's screen.

As an example if each tile were a square meter then using a 64-bit coordinate system would result in a space 18446744073709551616m2 large which is 7.122 trillion square miles. This means across one axis the game world would be 1.212 light years long.
2012-03-15 16:58:00

Author:
Ayneh
Posts: 2454


How would you store the data that tells the system which square is where? Or would you make it randomly generated? Or based on an algorythm with perhaps a touch of randomness mixed in?2012-03-15 18:05:00

Author:
Antikris
Posts: 1340


My question is who will be the one to test whether or not the algorythm allows you to travel 1.212 light years.. That would take a while don't you think? Unless I'm understanding this all wrong.2012-03-15 21:57:00

Author:
Wolffy123
Posts: 406


How would you store the data that tells the system which square is where? Or would you make it randomly generated? Or based on an algorythm with perhaps a touch of randomness mixed in?
I imagine the game world being defined entirely by a few functions, equations, algorithms, whatever. So, based solely on the player's current coordinates, the terrain could be constructed around them.

For instance if the input was x=y+1 then a tile would be placed diagonally across the span of the world intersecting y at 1. If a point along that line enters the player screen (an area surrounding their current coordinate) then it would be drawn.


My question is who will be the one to test whether or not the algorythm allows you to travel 1.212 light years.. That would take a while don't you think? Unless I'm understanding this all wrong.
When you move you're essentially adding or subtracting a coordinate unit from either the x or y axis. You could change that so you move a few trillion units at a time or you could just manually change which coordinates the player occupies.

If you did it manually and travelled at 15 tiles per second from the origin it would take 39 billion years... then the coordinates would overflow and you'd be back where you started.
2012-03-15 23:17:00

Author:
Ayneh
Posts: 2454


If a point along that line enters the player screen (an area surrounding their current coordinate) then it would be drawn.

So what you mean by "Drawn" is emitted, right? If this is so then who will design these coordinates? Once again, this will take a while. Unless you have some sort of algorythm or pattern that designs these coordinates for you?
2012-03-15 23:32:00

Author:
Wolffy123
Posts: 406


You can't really use functions, or the world would become either repetitive or very unpopulated at the "limits". You could seed a pseudo random generator with the coordinates, so you get unpredictable outcomes that stay the same for the same coordinates.

In stead of tiles you might want to consider randomly picked set pieces that can easily combine into larger shapes (like overlapping hill shapes forming a larger hill). Either way, you'll need to create some coherence in the environment, perhaps by a lower resolution "theme" (this here is a forest, so its random table favours trees, here's a village, so more houses).

This won't be easy, but good luck all the same!
2012-03-16 23:46:00

Author:
Rogar
Posts: 2284


So what you mean by "Drawn" is emitted, right? If this is so then who will design these coordinates? Once again, this will take a while. Unless you have some sort of algorythm or pattern that designs these coordinates for you?
Yeah, I wrote an example of that in the previous sentence to what you quoted. Ideally you would only need to change a few parameters to develop new worlds. I think water would be the fundamental modifier of a world, since it shapes the landscape and where settlements often end up.


You can't really use functions, or the world would become either repetitive or very unpopulated at the "limits". You could seed a pseudo random generator with the coordinates, so you get unpredictable outcomes that stay the same for the same coordinates.

In stead of tiles you might want to consider randomly picked set pieces that can easily combine into larger shapes (like overlapping hill shapes forming a larger hill). Either way, you'll need to create some coherence in the environment, perhaps by a lower resolution "theme" (this here is a forest, so its random table favours trees, here's a village, so more houses).

This won't be easy, but good luck all the same!
All good ideas.

I don't intend to work on this myself, I'm just thinking aloud how stupidly huge game worlds for RPGs and the like may be possible with little thermo cost.
2012-03-17 21:45:00

Author:
Ayneh
Posts: 2454


ask Felkroth haha. She's really intricate with her RPG's. Hopefully if Mm makes another UGC game, with a better engine and higher capabilities, your dream would be possible.2012-03-18 10:36:00

Author:
RoDRiGo-FiLiPiNo
Posts: 60


You can't really use functions...

I think it could work, as long as you have sufficient thermo to implement an algorithm which can generate an arbitrary amount of pseudorandom entropy from the input coordinates directly, as opposed to using an iterative method like the MD5 hashing algorithm (http://en.wikipedia.org/wiki/MD5#Pseudocode), which can deterministically produce completely different 128-bit outputs given very close values of an 8-bit input, e.g...

0 -> 93b885adfe0da089cdf634904fd59f71
1 -> 55a54008ad1ba589aa210d2629c1df41
2 -> 9e688c58a5487b8eaf69c9e1005ad0bf
3 -> 8666683506aacd900bbd5a74ac4edf68
4 -> ec7f7e7bb43742ce868145f71d37b53c
5 -> 8bb6c17838643f9691cc6a4de6c51709
6 -> 06eca1b437c7904cc3ce6546c8110110
7 -> 89e74e640b8c46257a29de0616794d5d
8 -> e2ba905bf306f46faca223d3cb20e2cf
9 -> 5e732a1878be2342dbfeff5fe3ca5aa3
etc.

You should be able to apply the principles of loop unrolling (http://en.wikipedia.org/wiki/Loop_unwinding) to something like the MD5 algorithm, by creating a number of parallel circuits, and given the number of iterations is effectively proportional only to the number of bits in the input (which is fixed), you should end up with a finite amount of logic which operates in a single simulation frame.

The only limitation will be that the total number of discrete outputs can't be greater than the total number of discrete inputs, i.e. 2128 with the suggested system.

The tricky bit will be finding a way to convert the resulting output into a landscape generator which can produce any sort of meaningful result, but this sort of thing has been done before, e.g. in the 1984 computer game Elite (http://en.wikipedia.org/wiki/Elite_(video_game)#Technical_innovations) it was used to generate the galaxies. You can download the source code here (http://www.iancgbell.clara.net/elite/bbc/index.htm#src), but it's not much use if you can't read 6502 (http://en.wikipedia.org/wiki/MOS_Technology_6502) assembly language.
2012-03-21 00:08:00

Author:
Aya042
Posts: 2870


Uh, yeah, that's what I meant. 2012-03-21 11:02:00

Author:
Rogar
Posts: 2284


0 -> 93b885adfe0da089cdf634904fd59f71
1 -> 55a54008ad1ba589aa210d2629c1df41
2 -> 9e688c58a5487b8eaf69c9e1005ad0bf
3 -> 8666683506aacd900bbd5a74ac4edf68
4 -> ec7f7e7bb43742ce868145f71d37b53c
5 -> 8bb6c17838643f9691cc6a4de6c51709
6 -> 06eca1b437c7904cc3ce6546c8110110
7 -> 89e74e640b8c46257a29de0616794d5d
8 -> e2ba905bf306f46faca223d3cb20e2cf
9 -> 5e732a1878be2342dbfeff5fe3ca5aa3
etc.


Well, after i cut that, print it on a paper,turned it upside down, hold it in front of a mirror and had a look at the reflection, didn't make much difference to me. : D
2012-03-21 15:23:00

Author:
zupaton
Posts: 167


I think it could work, as long as you have sufficient thermo to implement an algorithm which can generate an arbitrary amount of pseudorandom entropy from the input coordinates directly, as opposed to using an iterative method like the MD5 hashing algorithm (http://en.wikipedia.org/wiki/MD5#Pseudocode), which can deterministically produce completely different 128-bit outputs given very close values of an 8-bit input, e.g...

0 -> 93b885adfe0da089cdf634904fd59f71
1 -> 55a54008ad1ba589aa210d2629c1df41
2 -> 9e688c58a5487b8eaf69c9e1005ad0bf
3 -> 8666683506aacd900bbd5a74ac4edf68
4 -> ec7f7e7bb43742ce868145f71d37b53c
5 -> 8bb6c17838643f9691cc6a4de6c51709
6 -> 06eca1b437c7904cc3ce6546c8110110
7 -> 89e74e640b8c46257a29de0616794d5d
8 -> e2ba905bf306f46faca223d3cb20e2cf
9 -> 5e732a1878be2342dbfeff5fe3ca5aa3
etc.

You should be able to apply the principles of loop unrolling (http://en.wikipedia.org/wiki/Loop_unwinding) to something like the MD5 algorithm, by creating a number of parallel circuits, and given the number of iterations is effectively proportional only to the number of bits in the input (which is fixed), you should end up with a finite amount of logic which operates in a single simulation frame.

The only limitation will be that the total number of discrete outputs can't be greater than the total number of discrete inputs, i.e. 2128 with the suggested system.

The tricky bit will be finding a way to convert the resulting output into a landscape generator which can produce any sort of meaningful result, but this sort of thing has been done before, e.g. in the 1984 computer game Elite (http://en.wikipedia.org/wiki/Elite_(video_game)#Technical_innovations) it was used to generate the galaxies. You can download the source code here (http://www.iancgbell.clara.net/elite/bbc/index.htm#src), but it's not much use if you can't read 6502 (http://en.wikipedia.org/wiki/MOS_Technology_6502) assembly language.

In english please?
2012-03-21 23:25:00

Author:
Wolffy123
Posts: 406


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.