Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

891565 Posts in 33550 Topics- by 24785 Members - Latest Member: AndyP2013

June 20, 2013, 01:09:28 AM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Online Coop w/ Matchmaking in twin-stick shooter
Pages: [1]
Print
Author Topic: Online Coop w/ Matchmaking in twin-stick shooter  (Read 501 times)
Masakari
Level 0
***


Unknown Robot


View Profile WWW
« on: June 24, 2012, 02:36:27 PM »

I've been thinking about this, but would like an outsiders perspective.

Me and a friend are evaluating what our next project is gonna be. We pretty much agree it should be a slower paced, more tactical twin-stick, survival-wave-based shooter. Up until that point, fine. We're gonna use Unity, by the way, and the game is for PC (and possibly for other platforms, but PC for now).

We ran into a point of contention - I want the game to have 2-3 player online Coop, and he thinks just single player is fine, we should keep it simple, and doing online Coop is technically very hard, that we don't have the staff or the budget for it, and we should save that for a sequel, should the 1st game do well.

I'd like to know - is it THAT hard to do this in Unity? Is it that impossible to do to ensure a quality multiplayer experience?

I'm concerned about doing yet another single player twin-stick space shooter, there are quite a few of them and I feel we need something to rise above the crowd, so to speak, and also because the game's concept lends quite nicely to multiple players uniting against the AI.

Thanks in advance.
Logged

Maud'Dib Atreides
Level 4
****


Obsessed with space


View Profile WWW Email
« Reply #1 on: June 26, 2012, 08:14:59 PM »

Well since no one else is answering..

2-3 Players? That shouldn't be an issue at all. You can easily account for 2-3 players.

I highly recommend that you decide whether to add online feature before you start development. (But this isn't always the case)

I believe Unity can interface with the networking library Lidgren.Network (This library is just the bee's knees). I'm not using Unity myself (But nonetheless, still using C#) , but I know Lidgren.Network is popular among those proficient and not-so proficient in networking in general.

You should be able to have a client/server system running with 8 lines of code. You won't have to get your hands dirty.

It's not impossible to do this, it's rather easy, depending on your patience level and how much of the game you have made as is. You'll find yourself tearing apart your code to slap in networking at the last moment, if your game is nearing completion.

I can give you these pointers that your networking guy probz already knows:

Don't trust clients with a single thing whatsoever, except for controller inputs being sent to the server. This is how some malicious users can exploit the system.

Account for all network speeds. Update your world object coordinates every X seconds.

I'll leave the rest for someone to answer, someone who is using Unity.
Logged

Guy: Give me all of your money.
Chap: You can't talk to me that way, I'M BRITISH!
Guy: Well, You can't talk to me that way, I'm brutish.
Chap: Somebody help me, I'm about to lose 300 pounds!
Guy: Why's that a bad thing?
Chap: I'M BRITISH.
bateleur
Level 10
*****



View Profile
« Reply #2 on: June 27, 2012, 01:56:30 AM »

Getting multiplayer working in Unity is moderately easy. The hardest part by far will be designing the gameplay to accommodate network lag.

Example: Player 1 has built up a huge kill combo and her special attack meter is just about to reach full charge. Unfortunately, player 2 shoots out the end of the attack wave, leaving player 1 slightly short of charge. The end of stage boss then appears and the special attack is not ready.

...at least that's what happened on player 2's screen. Player 1, however, had a different experience. Her shots finished off the wave fractionally before player 2's attack connected and she consequently reached full charge. The end of stage boss then appears and she hits the button to activate the special.

So what happens here?

The classic multiplayer game is an FPS, which solves this problem by predicting motion for all characters and then correcting after the fact. This sometimes means you get shot whilst hiding behind a wall (because the "someone shot you" message is from half a second ago when you were visible) but mostly it isn't too bad. The question is, can you find similar viable workarounds for twin-stick shooter gameplay?

I'm not saying it's not do-able mind you... it just sounds hard!
Logged

Masakari
Level 0
***


Unknown Robot


View Profile WWW
« Reply #3 on: June 27, 2012, 10:14:33 AM »

Thanks for replying guys.

@#: precisely because it's a very important feature that affects the entire game, we needed to decide this from the start. As we are still in pre-production, there was time to properly evaluate it.

We have decided to add 2-player online & offline coop with matchmaking.

I will direct my friend to look at the Lidgren.Network library, I had heard about it before as being good. However, he has told me he's inclined to go with the Unity standard, as he is afraid plugging in an external system will increase the technical difficulties in implementing this.


@bateleur: indeed, we have talked about lag compensation. There's that system you described, there's the DoW 2 system where the game slows down for everyone to let "the lagger" catch-up with the others... we're gonna have to take a good hard look at that, because with lots of ships and projectiles on screen, it can be problematic.

Still, cutting it down to just 2 players will also cut down on potential problems, I believe.
« Last Edit: June 27, 2012, 04:58:16 PM by Masakari » Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic