Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Procedural World Generation  (Read 8376 times)
0 Members and 1 Guest are viewing this topic.
Offline Daniel Seabra

Senior Newbie


Projects: 2



« Posted 2011-01-04 15:06:02 »

This is not really a game, but it is an open source project, and the final result can most certainly be used for lots of games. The idea is to create a procedurally generated world. The entire thing will be up to the computer to create, all based on algorithms. You might star with a basic map:




And then add on to it: Biomes (deserts, forests, tundras), Natural Scenery (Lakes, Rivers, Mountain Ranges), and Artificial Scenery (Cities, Farms, Roads, Highways, Villages) are the goals of this project.

Here's a lake algorithm:




Imagine a WHOLE world created randomly. Imagine playing GTA and it would feel fresh every time. (perhaps, discussion held below (Would it? The algorithms must be changed for this to happen. Downloadeable content - Algorithms? That's a good one.)). Not only that, you could raid an entire city and escape to another country, for example.

Check out the current algorithms: www.danielseabra.net/prodGen

Interested? I need some help. Check out the videos and the information and see if you're up for it: https://www.kickstarter.com/projects/dseabra/procedurally-generated-world
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #1 - Posted 2011-01-04 18:12:41 »

Cool, definitely looks pretty good.

It would be nice if there was more variety of edges - some smooth and some jagged. Currently it's not that varied (at least from your screenshot).

See my work:
OTC Software
Offline avm1979
« Reply #2 - Posted 2011-01-04 19:11:12 »

Looks pretty cool.  And reminds me of something I started playing around with a while back.



The above it just colorized perlin noise, really.

Quote
Imagine playing GTA and it would feel fresh every time.

Hmm.  While it seems like a procedural world will be fun to explore, is that actually the case?  A lot of the low-level detail will have a sameness to it (even if it's technically "different") simply due to the lack of human creativity involved in its generation.  A lot of the fun of exploration comes from the fact that what you're exploring was created by another human mind - you get a glimpse into that mind, and that's what's fundamentally interesting about it.  Then again, if the rule system used for generation was involved enough to be interesting, it might work - but I suspect it'd have to be tuned to the game in question.

Have you looked at Dwarf Fortress?  That features world generation taken to quite an extreme level, and I think it's a good example.  There are something like 100 different types of rock - and the underground is generated in excruciating detail, because that's what actually *matters* to the game.  I'm not sure a generic solution could delve deeply enough into any given area to be as interesting.

Actually, everything in that game is taken to an extreme level that pushes the boundaries of sanity.  Maybe "pushes" isn't the right word - I think "gleefully disregards" is more appropriate Smiley  But I digress...

The whole concept of world generation is quite fascinating, though - so by no means take this as me trying to discourage you Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline krasse
« Reply #3 - Posted 2011-01-04 19:19:40 »

I have some links for you Smiley.

Here is a game engine video of a procedurally generated universe. An early version of this game engine was documented in a Master's thesis:
http://www.youtube.com/watch?v=fO7XhaTGDYg
The journal of one of the developers:
http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350

This company has a very impressive procedural city generator which is documented in research papers:
http://www.procedural.com/

Here is a very good free book about L-systems and plant generation:
http://algorithmicbotany.org/papers/#abop


Offline avm1979
« Reply #4 - Posted 2011-01-04 19:38:00 »


Damn, that's *seriously* impressive.  

Too bad it's an MMO.  Is the project dead?  Looking at their website, it's kind of hard to tell, but "most anticipated game" award from 2006 doesn't bode particularly well.

Never mind, just saw the video is from August this year.  Er, last year, but that's still not too far off.

Offline Daniel Seabra

Senior Newbie


Projects: 2



« Reply #5 - Posted 2011-01-05 00:25:09 »

Wow! Thanks for the awesome response everyone. For anyone still in interested, this is not even close to being done yet, those are some simple prototypes.

Quote

The above it just colorized perlin noise, really.
It maybe Perlin noise, but it actually looks really nice. Many maps are based on perlin noise. Is the application of this technique recommended or would it be better to use another?



Quote
Hmm.  While it seems like a procedural world will be fun to explore, is that actually the case?  A lot of the low-level detail will have a sameness to it (even if it's technically "different") simply due to the lack of human creativity involved in its generation.  A lot of the fun of exploration comes from the fact that what you're exploring was created by another human mind - you get a glimpse into that mind, and that's what's fundamentally interesting about it.  Then again, if the rule system used for generation was involved enough to be interesting, it might work - but I suspect it'd have to be tuned to the game in question.

Yes, the question of whether it would be fun or not really depends on the algorithm and go far in depth it goes. Ideally you want to go several more levels into the world than the player will see - and things must of course be programmed like someone would make them. Otherwise you lose your human touch. Even so, creativity is lost so you have to make up with something else - perhaps a new algorithm every so often, to shake things up a bit. However, at least for now, I'll try to remain on a macro level so as to not kill myself with stuff. If I was already thinking about having cars, trains, dogs, cats, plants, seeds, strawberries [...] I might go crazy. That's not to say that I won't have those, I just want to concentrate on Macro first.

Dwarf Fortress is insane - I haven't had any hands on time with it but it looks amazing.


Quote
I have some links for you .

Here is a game engine video of a procedurally generated universe. An early version of this game engine was documented in a Master's thesis:
http://www.youtube.com/watch?v=fO7XhaTGDYg
The journal of one of the developers:
http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=263350

This company has a very impressive procedural city generator which is documented in research papers:
http://www.procedural.com/

Here is a very good free book about L-systems and plant generation:
http://algorithmicbotany.org/papers/#abop

All of this is incredibly amazing. Thank you very much for posting it.






Offline avm1979
« Reply #6 - Posted 2011-01-05 01:07:16 »

It maybe Perlin noise, but it actually looks really nice. Many maps are based on perlin noise. Is the application of this technique recommended or would it be better to use another?

Ah, thanks.  It's just a simple anti-aliasing pass (blurring, more like it) that makes it look a little nicer than it should.  I'm not an expert, but as far as I understand there's a fair bit of literature on this subject, and perlin noise is probably the simplest way to go about doing this, not the best.  I'd guess something that more accurately simulates actual terrain formation (erosion, fault lines, etc) would produce "better" results, along with being lots more complicated.

Offline Daniel Seabra

Senior Newbie


Projects: 2



« Reply #7 - Posted 2011-01-05 01:20:38 »

Hm. Perhaps we are able to find a middle line, maybe a bit less simple than perlin noise but not as complicated as simulating erosion and fault lines. Honestly though, the perlin looks pretty ok, just a bit blurred and inconsistent, in my opinion.

I've been working with mean value generation a bit. Basically it works by creating several mountains and valleys which have a low depth. From there we "flatten" it by averaging the values. For example, a block next to a tall mountain (depth -32) might become -30 and the next one -26 and so on, of course with a bit of randomness. I applied this method to a simple applet, and these are the results I got:



The result is incredibly interesting. I have no idea what went on during that generation though. You can kind of see the original mountains, but I only generated 5 or so and many more are visible. Same for the valleys. I might have made a mistake in my programming, I still haven't had enough time to debug.
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #8 - Posted 2011-01-05 01:40:21 »

Hm. Perhaps we are able to find a middle line, maybe a bit less simple than perlin noise but not as complicated as simulating erosion and fault lines. Honestly though, the perlin looks pretty ok, just a bit blurred and inconsistent, in my opinion.

I've been working with mean value generation a bit. Basically it works by creating several mountains and valleys which have a low depth. From there we "flatten" it by averaging the values. For example, a block next to a tall mountain (depth -32) might become -30 and the next one -26 and so on, of course with a bit of randomness. I applied this method to a simple applet, and these are the results I got:



The result is incredibly interesting. I have no idea what went on during that generation though. You can kind of see the original mountains, but I only generated 5 or so and many more are visible. Same for the valleys. I might have made a mistake in my programming, I still haven't had enough time to debug.
Do you have a specific sea level, so that something with Y < 0 is underwater and > 0 is land? Or did you just randomly add water everywhere? Also, do you factor/render on a pixel-by-pixel basis?

See my work:
OTC Software
Offline Daniel Seabra

Senior Newbie


Projects: 2



« Reply #9 - Posted 2011-01-05 02:59:36 »

Quote
Do you have a specific sea level, so that something with Y < 0 is underwater and > 0 is land? Or did you just randomly add water everywhere? Also, do you factor/render on a pixel-by-pixel basis?

I did Y < 0 is underwater and > 0 is land for this simulations and I did render pixel by pixel.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #10 - Posted 2011-01-05 10:52:36 »

That's cool, but why only have two dimensions? Having three dimensions for this seems a lot more interresting. I didn't read the whole thing - am I missing something?

Offline krasse
« Reply #11 - Posted 2011-01-05 12:16:49 »

  I'd guess something that more accurately simulates actual terrain formation (erosion, fault lines, etc) would produce "better" results, along with being lots more complicated.

I remember reading something from the Spore team for generating the terrain for planets (and also textures). They used "particles" that they sprayed on surfaces that simulated some kind of natural terrain formation. The results certainly look good but perhaps not realistic.

Offline Mike

« JGO Spiffy Duke »


Medals: 87
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #12 - Posted 2011-01-05 14:03:20 »

That's cool, but why only have two dimensions? Having three dimensions for this seems a lot more interresting. I didn't read the whole thing - am I missing something?

Nope, the function returns 1 for land and 0 for water. Having height in there would be really great indeed Smiley

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Daniel Seabra

Senior Newbie


Projects: 2



« Reply #13 - Posted 2011-01-06 00:10:18 »

Quote
Quote from: Mads on 13 hours ago
That's cool, but why only have two dimensions? Having three dimensions for this seems a lot more interresting. I didn't read the whole thing - am I missing something?

Nope, the function returns 1 for land and 0 for water. Having height in there would be really great indeed Smiley

Yeah, right now it's only 2 dimensional. I am planning height, I just haven't added it yet (school just started so you'll have to wait until the weekend) Smiley
Offline Mike

« JGO Spiffy Duke »


Medals: 87
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #14 - Posted 2011-01-10 13:04:36 »

Yeah, right now it's only 2 dimensional. I am planning height, I just haven't added it yet (school just started so you'll have to wait until the weekend) Smiley

How did it go? Do you have some uber cool picture to share? Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline JL235

JGO Coder


Medals: 10



« Reply #15 - Posted 2011-01-10 16:04:45 »

Someone I know is building something similar here. You might be interested as his includes his source code.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (32 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (50 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (58 views)
2014-11-29 21:32:03

toopeicgaming1999 (123 views)
2014-11-26 15:22:04

toopeicgaming1999 (114 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!