Post tutorial Report RSS Why doesn't multiplayer work?

Why doesn't multiplayer work correctly and why can I invite friends to my game on mission 1, but they get kicked out after we complete the mission?

Posted by on - Basic Client Side Coding

Multiplayer doesn't work correctly because ASDM was built to be a single player game. However, I didn't remove several of the networking components so you can still invite people to join your lobbies. This will work for mission1 but will not work for subsequent missions in the campaign.

I know it seams odd that I took a game that was already multiplayer and forced it (for no immediately obvious reason) to become single player. In order for a sever to host multiple clients successfully, both the server and all of the clients need to have the same version of the level file (ie mission2.bsp). Because the mission files (for Missions 2-5) are randomly generated by each client, each client ends up with a different level and are not able to play together.

There are of course ways to fix this, but during my initial prototyping and reseach I wasn't able to find a solution in an adequate amount of time and had to make the design decision to go single player. If I had additional time I would certainly reincorporate multiplayer support. Perhaps if there's enough community encouragement I'll give it a go. Otherwise, if anyone else wants to try, the full source code for ASDM is publicly available: Subversion.assembla.com

Post comment Comments
Raygoza
Raygoza - - 1,639 comments

As you said about the levels being adapted why instead of adapting to each player separatley you could adapt them for the group of players, that way the level generated will be the same for everyone.

Reply Good karma Bad karma+1 vote
ppittle Author
ppittle - - 20 comments

Hey Raygoza,

You're correct, the server would need to generate the random component and then distribute it to each player. From my exploration of the code, Alien Swarm originally had the functionality to support random multiplayer levels. A random seed (http://en.wikipedia.org/wiki/Random_seed) would be generated server side and then distributed to each player. The tilegen process would then use the seed so that each player generated identical layout files. If this worked (I didn't get a chance to fully investigate it and test it) this would solve the majority of the problem.

Reply Good karma+1 vote
NightFury14
NightFury14 - - 6 comments

this answered my question.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: