Archived

This topic is now archived and is closed to further replies.

fireking

Game World Concept, Design, Creation, and Management

Recommended Posts

Hi, I am currently, a small-time game developer. Technically that means I''m working on a game, but I''m not with a well established game development company nor publisher. I have a few people helping me with the game (non-code related work), and the progress is moving along fairly well. We are currently in the stage of design and concept, and I''m programming a few things along side this process to get a feel for what''s to come. The current task at hand is to figure out how we are going to create/generate/and display our world. More importantly, creating it. The world for the game is rather large, and a world map has already been created. We''ve taken steps to research several geography related topics, such as "biomes" and termperate zones "the north pole is cold, africa is hot". Thing''s like this are being taken into consideration during the design of our world. I''ve spent several weeks researching on the internet on how some commercial games that have already been released generated/created their worlds. It''s hard to tell which games used actual models/meshes, mathematically generated content, or a combination of the two. I''ve found very little information about specific games that use a specific method (my guess is they dont want to reveal how they''ve accomplished something, its a threat to them within their industry). Makes sense. But I''m stuck somewhere in between. I need to know how to create and manage such a massive world, while considering memory management and effeciency, considering servers that will host each portions of the world, how it will all connect together in the end. It is a mind boggling task to take this in all at once. In the mean time, I''ve been researching several different terrain generation methods, and how to create terrain naturally, instead of using some random values all over the place. Methods such as fault formation, mid point displacement, hill or circles generation, valley creation, and other similiar are the basics of generating terrain naturally. The world for this game is fairly large, so I''m currently trying to find the exact way that we''re going to store it. Here are the things that are set in stone. World Map -We have a world map, its a 1024x1024 image. There are 3 different versions of the map. One version contains 6 different colors, specifying the temperature. For instance, a color (r=255,g=0,b=0) might mean that this area is hot and near the equator. Another version contains the Biomes defined by colored areas on the map as well. For instance, a forest is specified on the world map by a color (r=0,g=255,b=0), anywhere this color is drawn on the world map is where a forest lies. Another version contains the plant/vegitation, defined by colored areas. We have not set a limit to how many different versions of the world map can exist. We might discover that there is a need for more world maps so that we can specify other things (one thing I see in the future would be weather and creature placement). I''ve already tried to do a few things, but I''m starting to think that its definatly not the way to go. We tried taking the world map, and splitting up into 32x32 chunks. Resize each chunk to be 1024x1024, fix the resolution loss (easily accomplished in photoshop), then save as an image that contains greyscale color. Generate the terrain using a terrain generation method (such as mid-point displacement), and combine it with the exported image from photoshop. This works fairly well, but is very time consuming. I dont think agrees with the "big picture" either. We need to be able to create the entire world for the player to explore. The method that I was originally going to use was loading of floating-point files. All terrain data would be stored in several files, made up of float point values for each height within the x,y grid. This would be fine for smaller worlds, but I''m beginning to believe its not going to be effecient enough. For rendering, I planned on using a paging system. Depending on the terrain block that you were currently located in, the 8 surrounding terrains would be rendered. There would be a total of 9 terrains in memory at all times. This seems fine, but again I''m beginning to believe its not going to work in the scheme of things. There are no zones, and no scene transitions as of now. I would like to keep it that way if at all possible. But I''d rather figure out how to actually generate the world before I worry about rendering it. The world will not be static either, but the world does have to have a starting point. This starting point is the original world. Throughout game play, the world will be changed of course, and saved on the server. The original plan allows for this to happen, but currently the original plan isnt working as well as I had planned (no pun intended). Ok, so after reading everything I''ve written here, you might be able to understand where I''m coming from, and give me some tastey insight to the secret behind large worlds, how they are designed, generated, created, and rendered. Clearing up a few things: I''m developing a 3d Engine using Open GL, we are using Visual Studio .Net C++, the game is an MMORPG (my second one, first time ever doing 3d though). Thank you for your time.

Share this post


Link to post
Share on other sites
Yeah, but I''m talking about going back to square one. What would even be in the file in the first place? See what I mean? I''m questioning the entire process, from the very start. It would be nice to know how games like shadowbane, and everquest, and other large mmorpg''s accomplish this. Even if I just knew how the actual world geometry data was stored for one of those games, it would help.

I''ve looked all over the net and haven''t been able to find anything of any flavor for storing worlds. (you''ll find tons of articles on tile engines (which still dont tell you about managing large worlds, just small maps), articles about heightmaps (which i can already do), and several other older techniques.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Don''t know if you allready know this one:
(from the makers of dungeon siege)

http://www.drizzle.com/~scottb/gdc/continuous-world.htm

Share this post


Link to post
Share on other sites
all i can think of is maybe a file each for height, x,y, texture

and maybe pull data out of that

i reakon just create a quick class to read and write the map data, that is until you think of a better way or it is going too slow

Share this post


Link to post
Share on other sites
First, I''m no expert but hopefully I can help point you in the right direction. I highly recommend you check out the following article:
http://www.gamedev.net/reference/programming/features/superfrustum/

second, check out:
http://research.microsoft.com/~hoppe/svdlod.pdf
and also check out the related video:
ftp://ftp.research.microsoft.com/users/hhoppe/mpg/svdlod.mpg
The above comes from Hughes Hoppe''s most EXCELLENT 3d home page:
http://research.microsoft.com/~hoppe/

Beyond those, I recommend buying a good book on roam terrain engines.

I am also working on a 3d game. I am just starting and I have not yet gotten to the point of moving to generating terrain. So your questions have me asking my own questions of how I am going to generate and render terrain. I think I will research this problem in my context and report my questions and answers in this thread.

Share this post


Link to post
Share on other sites
part 1)

How will I generate terrain content quickly? My engineering background will show here...

My first pass idea would be grab matlab and make a matrix for my world. I would populate this matrix with guassian distributed random data. This matrix would be the height map for my world.

Now the problem with this is it is much too erratic, with there being radical changes from point to point. To combat this, I would suggest running a 2d filter over the terrain. By changing the bandwidth of this filter I could achieve rockier or smoother terrain.

But I wonder if this will hold up to realistic scrutiny. I may go try it and report back.

Edit, added:
some results:
I tried this in matlab and I found that one, the level of filtering needs to be high to make it look good at all. And two, it just doesn't feel like earth. The results come across more as an alien world.

Maybe I should add some form of wind and water erosion to my model.

Another thing is tryng to put the whole world into one tile takes up too much main memory (duh!). So I need a method to make subtiles and then guarantee they meet up well at the edges. How to do this... tbd.

I should add that when I am done with my terrain model, I would probably like to take the terrain and treat it as a convex control point hull for either a series of Bezier or NURBS patches. This will smooth terrain further and allow me to render the terrain to polygons with arbitrary precision.

But this begs the question, do I render it to some arbitrary high level of detail and store that to a format that contains edge collapses/vertex splits so that arbitary level of detail is handled this way? Or do I keep it as bezier/NURBS and build bez/nurbs rendering into my engine? Further, if I do use bez/NURBs for my terrain engine, how inefficicient will it be to do collision detection to make it seem like game characters are walking on this terrain?


[edited by - red_mage on November 17, 2003 3:41:26 PM]

Share this post


Link to post
Share on other sites
red_mage, keep going with your research in this thread, i just wanted to let you all know that im reading everything you''re giving me...

it doesnt answer the question, but its helping, so keep it coming

and thanks!

Share this post


Link to post
Share on other sites
Never done terrain before but from what i have read b4 from the Dungeon Siege Continuos World article, i think it is very useful. They don''t use heightmaps, but instead use small meshes and "stitch" them together to form an area. The advantage of this method is that you can load small amounts of geometry during runtime and not have slowdown. Also this method applies to all objects, trees, houses, barrels, bridges and anything that you see. While there is no code, the concept has been proved in Dungeon Siege where you never go through a loading screen from start to finish with the exception of the startup. Also, i feel it gives you alot of control over the detail of any area in your game.

Share this post


Link to post
Share on other sites
It turns out the nevrax engine does use bezier patches for terrain. So there are people out there using bezier for terrain.

I found a good link on water erosion:
http://www.geocities.com/Area51/6902/t_hydro.html

It provides source for a c program that takes a matlab height field matrix and erodes it. It is super slow though.

I think I need to come back around and restate my goals and plan for terrain. I could handle terrain in several ways.

High level world design (the game globe):
Given my game is in a feudal Japanese cultural setting, perhaps I could download heightmaps for pieces of Japan. Maybe I could also get climatological/wildlife data on regions. This has the problem that it might be missing that fantastical element that grabs players.

Another method would be to sit down and draw a map that shows the regions, and detail geology and climate/wildlife for the regions. This would be the Tolkeinesque method of world creation.

A third method would be to have code that creates a landscape with random fractals, then water erodes the height map, to create a realistic random landscape.

For any of these methods, I''d need to figure out the scale of the world I''d use. Like perhaps 16km on a side? Its a balancing act of making the world big enough to warrant exploring, but small enough that it doesn''t feel empty and lifeless.


Low level world design:
Perhaps for each pixiel in the world heightmap, I would create a game tile. Each tile could either be a varying level of detail polygonal mesh, a set of bezier patches, or set of NURBS patches. Given that some nevrax/ryzom is using the bez patch method now, I am inclined to use that. Also by the time my game is released (2-3 years, if ever) graphics hardware will probably have advanced to the point that bez patches are commonly supported and not a performance issue.

Now what about what makes up the tiles? Do I create each tile by hand, do I autogenerate the tiles, or some mix of the two? I am inclined to mix the two.

I think I would create a library of trees/rocks/grass/mud/swamp/snow/etc region content sets and each tile would be some mix of a region content set. For example consider a region in an area marked at the high level as a frigid evergreen forest. Tiles in this region would grab at random content from the region type. They would have snow on the ground, occasional frosty rocks sticking out, and various large evergreen trees. As you moved away to the border of the forest towards a frozen mountainous area, the tiles may mix between the frosty evergreen forest content table and the rocky mountain peak table.

More TBD. Ask specific questions if you have them

-rm

Share this post


Link to post
Share on other sites