Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

We're talking about an expansive game that is not divided in levels or checkpoints. A 3D adventure, for example.

share|improve this question
add comment

2 Answers

up vote 42 down vote accepted

Simple answer: the game is divided into chunks, while you move around chunks are constantly being loaded behind your back before you can see them and thrown away when you leave the area. To every simple answer is a complex solution that weighs innumerable trade-offs in implementation... but you get the idea.

For games where you think you can see tens or hundreds of miles away, everything out there is fake. The real far stuff is just a bitmap, the medium range is a very light mesh. The real stuff gets loaded in and placed on top of the fake stuff before you get to it.

When chunks get unloaded they save the state of any objects or puzzles in progress so that when you come back they reset themselves to where you last saw them.

All this bypasses your main question so here's the real answer: there is always a loading time when you first start up the game but either you don't recognize it because it "always takes time to start up a game" and you expect that or it's hidden behind loading cinematics or happens while you play around in the GUI.

share|improve this answer
4  
Except in games such as Minecraft, when the chunks are actually loaded further out. –  liamzebedee Sep 21 '11 at 5:38
17  
..or games which just happen to fit into memory completely, or procedurally generate content, or or or. There's always some special case. =) –  Jari Komppa Sep 21 '11 at 5:53
4  
A common way to do it is also is to have some in-game loading screen, like an elevator ride. One of the more common ways this is done is also the long hallway or the metroid air-lock. A neat way to do this though is to hide it behind a rendered scene. Ever play God of War? Any time the camera becomes static its doing a long hallway or air-lock type load. Character and Collision are still in memory, world geo is getting updated :) –  James Sep 21 '11 at 6:26
2  
@Liam E-p Minecraft does exactly what Patrick's simple answer does. it loads the chunks around you, if you teleport in the game you can see the chunks being loaded as it was not expecting you. If you wander away it unloads them and saves their state to disk. As for the "tens or hundreds of miles away" part, minecraft has fog, it just limits your vision to hundreds of meters and does not render farther out. –  Scott Chamberlain Sep 21 '11 at 17:40
3  
If I think about this answer while playing a game that I am immersed in. I get sad. You mean to tell me that there isn't a world out there waiting for me to explore! It's waiting to be created, rendered, and then explored!! BAH! –  KRB Sep 21 '11 at 19:14
show 3 more comments

Previous answer pretty much nails it all. Also worth mentioning is Dungeon Siege I.

Here's a paper from one of the developer which actually goes over some of the architecture needed to make it work and common pitfalls:

http://www.floatingorigin.com/mirror/continuous-world.htm

I'd say it's a must read if you actually want to implement something like that.

share|improve this answer
1  
+1 for the Dungeon Siege link ... interesting reading! –  Marc Reside Sep 22 '11 at 18:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.