Procedurally generated worlds

Started by
11 comments, last by Zakwayda 13 years, 4 months ago
Hey guys,

I've been curious about this for awhile now but unable to answer it. I'm playing around with the idea of procedurally generated world and wondering if its possible to do them through game engines. I always have assumed that engines require an actual map/level file in a supported format, but is it possible to instead have them generate world on the fly similar to minecraft?

Thanks,
Justin
Advertisement
Think about what you're saying for a minute, and maybe you'll come up with the answer yourself :)

Hint: Yeah, it can be done, prime examples are Diablo 1 & 2, but those are nowhere near the only two that uses procedural levels/world.
Hmm...what throws me off is that I get the impression the engine loads the world once and then thats that, it knows everything about the level, the lighting on the map, where objects are placed.

I suppose maybe thats just how those particular games are designed? What would make sense to me is just having the engine build the next area based on the seed/parameters and basically just run a check on each game step to see if it needs to generate another piece of the world.

Logically it all makes sense to me there...I'm just stuck on the notion of how engines always have predefined maps from the start instead of having to build areas out of the blue during the games runtime.

One random stab in the dark here, but maybe that loading in the first place is just gathering the world data from the file (generate the world and save to a file, then load that in my case?) and then during the game steps the engine IS gathering each new area, it just grabs it from a predefined file created in some editor instead of from a file that was just created a function or two before?
yes, you can procedurally generate game world using engines, but that said engine must be modular enough to support that, and you might have a lot of coding ahead of you.

your question is very open, IMHO. did you code that game engine yourself?


This will help your open question.

http://en.wikipedia.org/wiki/Procedural_generation
Are engines with more cutting-edge graphics less easy to do this? I was under the impression that for lighting & high poly scenes there was a lot of pre-computation with regards these processes.
Think about what you are asking for a min. What is this "engine" you are talking about?
Engines are those magical black boxes that gameplay and artists use to make game. But not everyone uses the same engine, and each engine comes with its own tool chain. Some engines are more "fully featured" for rapid FPS development for instance. Others are more suited to 2d tile or 2d platformer games. Asking "can you do this with engines?" is an obvious "yes", but that still doesn't say much. You'll have to drill down to the point of understanding what answers you really want are. Whats the actual question? Where are you stuck? What have you tried? Where have you looked?

Quote:
Hmm...what throws me off is that I get the impression the engine loads the world once and then thats that, it knows everything about the level, the lighting on the map, where objects are placed.

I suppose maybe thats just how those particular games are designed?

Yes, they are often designed that way. It's a simplicity thing. It is easier to pack everything into a blob and just load up everything in one go. Even when you do that, you could still be doing it procedurally. You just build up a level at a time. You could also go with modifying a game with streaming technology. Instead of loading the next area from the disk, you generate it.

It is also easier to direct the player experience when you have a pre-defined level. You know where the player will be, and how hard each encounter will be. Look at most FPS games. You just run down a linear path to the end. Every encounter is scripted, and every camera shot planned. Then look at something like Diablo 2. Diablo 2 used pre-defined tiles with lots of rules for how to place them. This resulted in random dungeons, yet each time you'd end up with something similar to what you had before. This is good for tuning the game. Then you can look at something like Minecraft or DwarfFortress. They just make entierly random zones. Your experience isn't directed, and is different every time you play because stuff may or may not be in the zone, and defiantly isn't in the same place. That goes against a game's ability to tell the same story to everyone. That isn't always a bad thing, but for many AAA titles it is.



Also, check out:
Inifnity (developed by Ysaneya here on gamedev).
Quote:Original post by KulSeranThen you can look at something like Minecraft or DwarfFortress. They just make entierly random zones. Your experience isn't directed, and is different every time you play because stuff may or may not be in the zone, and defiantly isn't in the same place. That goes against a game's ability to tell the same story to everyone. That isn't always a bad thing, but for many AAA titles it is.


In the case of DwarFortress the user can provide a seed and be able to generate at least the same world. I don't know down to what local details might be random, but it could be just the common case of a game having random spawns, something not usually referred to as an example of procedural generation. Other games have persistent procedural worlds (Daggerfall, Noctis).
In reply to you, KulSeran, I guess I'm just caught up with the notion that an engine is some all knowing entity that doesn't like to function without its preset knowledge, the level in this case.

To boil down to a very specific reason for asking this, what I'm looking for is an engine, library, what have you, that would relatively easily put me on a path towards displaying a large world that is generated around you as you move (this is where the minecraft part comes into play, although I'd like for view distance to be further then the loaded world so you don't see it happening).

I'm slowly developing a game that would have a completely randomly generated world, but I've never fiddled with a game engine besides dinking around with modding the Source engine once.

I'm not convinced that I need to go out and find an engine to do this sort of thing, but I'd rather know beforehand if engines are capable of this. Hopefully that's a bit more helpful...I apologize for this being a bit of an open and unspecific bit of questions.

Justin
This isn't really saying anything new, but in short, it depends on the engine. I can think of some engines with which creating a completely procedural environment would be relatively straightforward, and others where it'd be basically impossible. So, it really just comes down to choosing an appropriate engine (assuming you want to use an engine).

Also, generating content procedurally will of course have implications for what sort of techniques can be used. For example, lightmapping and real-time, procedurally generated content probably won't go together very well (real-time dynamic lighting effects such as vertex or per-pixel lighting would probably work better in this particular context, I think).
Which engines are those?

The two things I'm interested in with this project are the ability to generate the world on the fly and also the lighting. I'd like to explore using more extreme contrast or saturation levels, heavy shadows, sun rays, clouds, maybe HDR or simulated HDR effects but if that knocks an engine out of the possibilities list that wouldn't be the end of the world.

This topic is closed to new replies.

Advertisement