The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action

It is currently 2014-04-24, 17:11

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 2012-03-05, 00:44 
Offline
User avatar

Joined: 2011-11-23, 09:28
Posts: 85
Hi @ll,

With the taget of building an mmorpg with very lage terrains, I cannot use CaWE to build the complete terrain, but only parts. Is there any possibility to load the "next" map part in any easy way or do I have to write such things by myself?

_________________
Project Status: Code architecture definition
6 Programmers, 1 Photographer, 1 Architect, 1 Game designer


Top
 Profile  
 
PostPosted: 2012-03-05, 01:02 
Offline

Joined: 2011-05-31, 07:37
Posts: 95
You'll probably want to introduce level streaming for an MMO, have a master heightmap and paintmap chopped up into small chunks which the client can load as they get within a certain distance.
Would also have to have entities in groups... which is easier since the client doesn't even need to be aware of this, just told what exists nearby.

Terrain chunks themselves can be entities.. so that makes things easier.


Top
 Profile  
 
PostPosted: 2012-03-05, 16:36 
Offline
User avatar

Joined: 2011-11-23, 09:28
Posts: 85
Okay, I think I understand most of the idea... I will try to realize it this way. Thanks alot

_________________
Project Status: Code architecture definition
6 Programmers, 1 Photographer, 1 Architect, 1 Game designer


Top
 Profile  
 
PostPosted: 2012-03-06, 01:24 
Offline
Site Admin
User avatar

Joined: 2004-08-19, 13:46
Posts: 1903
Location: Germany
Well, I guess this should really be a FAQ -- just one that we have unfortunately no conclusive answer for (at this time).
;-)

Seriously, even though Cafu supports very large terrains already, people often ask how they can make even larger ones, usually for an MMORPG. Maybe the problem is that I don't really know any MMORPG, and have never played one, and thus I'm in a difficult position to provide any help.

As I have no idea how terrain streaming for "endless" worlds is supposed to work (in the client-server context), the best suggestion that I can make is to "work-around" the problem as described here:
viewtopic.php?p=3706#p3706

I'm open to any other suggestion as well, but then somebody really had to explain to me in technical terms (or at least in general technical terms) what changes we principally had to make in order to make Cafu natively support MMORPGs with terrain streaming...

Haimi wrote:
Is there any possibility to load the "next" map part in any easy way or do I have to write such things by myself?

Personally, I'd load the "neighbor" map whenever the player walks into a trigger brush that is near the border of the current map, as described in the above mentioned post. This is not a very fancy way to do it, but it works with Cafu as-is, no custom coding required, and well understood and ready to use.
(I also believe that it is a very sound way of doing this. E.g. in "Rage" any many other games they're doing exactly the same, and certainly not because everyone loves loading pauses.) ;-)

_________________
Best regards,
Carsten


Top
 Profile  
 
PostPosted: 2012-03-06, 07:16 
Offline

Joined: 2011-05-31, 07:37
Posts: 95
MMO architectures varies wildly from one game to another.
A lot of MMOs are a simple giant world completely devoid of interaction with player/npc threads and a database for inventory.
For more advanced MMOs with dynamic worlds the world is generally a large matrix of instances, these instances are statically or dynamically allocated in size. Loaded and unloaded to save power so world chunks with no players don't waste power.

Cafu in terms of client doesn't need much work to become a MMO which would be fast enough for even FPS.
As for server, you'd probably want to run a cluster of Cafu servers joined together with a hub that makes it invisible to the client that you're travelling from one node to another.

Client side the player doesn't move from one chunk to another, when they walk out of one chunk the world shifts position and the player's location changes. Although server side you just disconnected from the trailing chunks and connected to the leading chunks.


Top
 Profile  
 
PostPosted: 2012-03-06, 14:38 
Offline
User avatar

Joined: 2011-11-23, 09:28
Posts: 85
For my approach of MMO, i don't need a lot of instances, so the whole world is shared for all players. In a later phase of the project, there will be instanciated parts of the world, but only very small compared to the main map.
I want to avoid loading pauses at any cost, so i don't fear doing huge code changes :D
Like HWGuy already mentioned, I don't want to build one very large map because of compiling and initial loading times not to mention the performance leaks!

Quote:
Client side the player doesn't move from one chunk to another, when they walk out of one chunk the world shifts position and the player's location changes

If I understand your approach and think it a little further, this may be realized in a kind of Grid like this:
Image
So the player has an additional "position" information - the position in a specific map part.

_________________
Project Status: Code architecture definition
6 Programmers, 1 Photographer, 1 Architect, 1 Game designer


Top
 Profile  
 
PostPosted: 2012-03-06, 15:10 
Offline

Joined: 2011-05-31, 07:37
Posts: 95
Ya, it's as simple as that, there's a bunch of different ways of doing that but that's what it boils down to, in games like Fallout the chunks aren't prefect squares, just odd shaped pieces of world strung together with triggers saying what each connects to and it renders a few ahead, also uses LoD so the chunks aren't very detailed a ways away and culling so you can't see the fact that they don't actually fit together.

Fun thing about chunk coords is empty chunks don't have to take any space, so you could have space game with 2^32^3 chunks which are a cubic AU(astronomical unit) in size. That's 20 times larger than our galaxy, disk space needed to for a galaxy with as many stars and planets as there are in ours... very little if every solar system was seed based... 200 billion * 64 bits = 12.800 TB


Top
 Profile  
 
PostPosted: 2012-03-06, 15:46 
Offline
User avatar

Joined: 2011-11-23, 09:28
Posts: 85
So if I use the map chunks with LOD models and load the chunks by approaching a trigger and unload a chunk by departing the player from a trigger might be the right way like this: Image
The loading zone is the area of a specific distance to the trigger at the border of the current area. On entering this area the next part is loaded and somehow "merged" to the current map, like it is one big map. This is my whole idea, because you can "simulate" one big map without needing to load everything into the RAM at once.

_________________
Project Status: Code architecture definition
6 Programmers, 1 Photographer, 1 Architect, 1 Game designer


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group