This group is dedicated to promote and help Co-operative Games & Mods Developers. A place to co-operate and share, and also to get the attention our Projects deserve. With Co-operation we can make almost everything possible.

Forum Thread
  Posts  
Singleplayer Maps to Multiplayer co-op Maps (Groups : Co-op Games & Mods DEVELOPER GROUP : Forum : Single-Player to Multi-Player Co-op : Singleplayer Maps to Multiplayer co-op Maps) Locked
Thread Options
Sep 1 2009 Anchor

In virtually every game the limits for Single-Player Levels are higher and maps can offer more interactivity and more details.
Using such a maps for Multi-Player Co-op will go well in the most cases, but in some cases it doesn't, and then the level has to be changed.

Sometimes you can change the game code or the maps if it has been released, but sometimes you seam to be unable to change anything. This is the moment where you have to look for alternatives, as for example if you have no map-source-files and the game does use the BSP file format there might be a way to edit the bsp-file it self. Or files which are loaded with the map such as models and objects, sounds and such.

In some games the sounds are placed on the map it self as sound, sound_speaker, sound_ambient or else entities, in some games the setup for sounds is loaded separately from a text-file for example. Some games have such text-files with the extension .sound, .snd .au, audio, .mus, .music, etc. Editing such files can also help to reduce the network traffic which is produced by a Single-Player map.

Perhaps you are wondering now, why is this guy talking about sounds and what the heck are entities.
Well if you do, that is good for you. Since I'm now telling you why this two things are important for the most On-line games.
Let us start with sounds, sounds are pretty cool usually, some are annoying and some sounds just suck like hell, but there is one thing all this sounds have in common in the most games. Sounds use network bandwidth!

You may think now that sounds are local, they are all stored locally and played locally and why on earth should anyone make sounds use network bandwidth... I tell you why, because sounds can be toggled on and off, sounds can move on the map, as for example sounds of moving objects and ambient sounds as for example a alarm or notify sound.

In the most games a sound event will be send with the file path and file name, as for example:
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
As you can see in this example I made the path and the file name very long, and if the game has to send this event to 8 players at once it will look like this:

SoundPath wrote: sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav
sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav


The most games do not just send the file path and file-name, they also send a commands in a string, which could look like this:
command, location/origin, path+sound-file, volume, hear until distance
playsound '0 0 1000' sounds/ambient_sounds/nature/birds/big_birds/eagle/eagle_bird_flatter_fast_fly_away.wav 1 300
Depending on the level it self and the sounds and other objects used in the level this data the server needs to sync with the player can exceed the limits of the Multi-Player system.

Now we come to the entities, a entity is everything which is not static, as for example a player, a item, a weapon, a enemy, a special effect, projectiles, decals and so on. Now when there are 8 players on a map instead of one, all entities have to be synchronized with 8 players instead of one, and each player is a additional entity, and if the players has a weapon or else items/object visible carrying around it's most likely that this object is also another entity.

I will give you a simple example which I recently encountered:
8 players, each carries a weapon, has a team identification above the head and a additional object attached and fires a weapon spawning 2 projectiles for each server frame time (frame time is for the server the amount of time from one moment to another for the server, which means if the server has 30 frames it syncs 30 times per second with each player).
This makes a total of 48 entities and if these are send to 8 players this makes 384 entity data send per frame just for the players to see each other firing a weapon and holding any item.

Reducing the sounds and objects which have to be synchronised with the players can help to reduce lag or fix problems on some maps. In id-tech3 engine based games you can set the attribute spawnflags 1 and make_static 1 on models, which makes them static and will not synchronize them with the players. The most Single-Player maps use a massive amount of ambient sounds/looping sounds and models, and for the Single-Player Mode they do not require attributes like spawnflags 1, so these attributes need to be added by the modder to make the map Multi-Player conform. Also sounds path and sound-file-names could be changed to reduce the traffic produced by the map it self.


Okay, I hope that helps anyone, thats it for now, if you have any ideas, suggestions, questions or else things you wana share with us go ahead and reply.

Edited by: Chrissstrahl

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.