Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: What does it take to go multiplayer?  (Read 4754 times)

vooood

  • Bay Watcher
  • Prophet
    • View Profile
    • Amalis of Daloth (TBA)
What does it take to go multiplayer?
« on: March 10, 2010, 02:56:41 am »

This is just a tought from another (game) developer. This is in no way a plead to Toady to make DF multiplayer but merely an idea.

What does it take for DF to go multiplayer? Once the new version is over I believe it would take a week at most to make it multiplayer capable. How? The principle is very easy. Some basic networking code can be solved by hundreds of done and free (maybe even open source) libraries, that's clearly not the issue. One DF should or could be the master "server" that runs simulation for the world (not that there's much simulated at this time). Once overland army contol is implemented one machine could control that without any hassle.

The only "problem" with multiplayer I see here is pausing and FPS issues. The first and simplest approach would be to sync the FPS to the slowest machine and when one player pauses then the game is paused for all. This clearly has many isses so let's move on.

Since synchronized time is only needed in player vs. player combat players could freely play and pause their games at their own pace (read: FPS). Once every few minutes, 30 minutes, 1 hour, or any (configurable) time the game could be paused in turn from the most advanced (in time) player to the last player so everyone can catch up. The paused players can take this time to do whatever management they want but could not unpause the game.

Or as the last but not least solution is a most radical one. Players can't pause the game on their own except when sync occurs OR there is absolutely no sync and the game moves at the pace of the slowest (least FPS) player.

What do you think?
Logged
Music was my first love, and it will be my last.
Music of the future, and music of the past.

Cheeetar

  • Bay Watcher
  • Spaceghost Perpetrator
    • View Profile
Re: What does it take to go multiplayer?
« Reply #1 on: March 10, 2010, 03:00:28 am »

It would lag so very horribly. Just for one line of sight in DF with lots around, there is lag for my computer. With, say, 3 players playing together, it would be horrendous.
Logged
I've played some mafia.

Most of the time when someone is described as politically correct they are simply correct.

piecewise

  • Bay Watcher
  • [TORTURE_FOR_FUN]
    • View Profile
    • Stuff
Re: What does it take to go multiplayer?
« Reply #2 on: March 10, 2010, 03:02:45 am »

This is just a tought from another (game) developer. This is in no way a plead to Toady to make DF multiplayer but merely an idea.

What does it take for DF to go multiplayer? Once the new version is over I believe it would take a week at most to make it multiplayer capable. How? The principle is very easy. Some basic networking code can be solved by hundreds of done and free (maybe even open source) libraries, that's clearly not the issue. One DF should or could be the master "server" that runs simulation for the world (not that there's much simulated at this time). Once overland army contol is implemented one machine could control that without any hassle.

The only "problem" with multiplayer I see here is pausing and FPS issues. The first and simplest approach would be to sync the FPS to the slowest machine and when one player pauses then the game is paused for all. This clearly has many isses so let's move on.

Since synchronized time is only needed in player vs. player combat players could freely play and pause their games at their own pace (read: FPS). Once every few minutes, 30 minutes, 1 hour, or any (configurable) time the game could be paused in turn from the most advanced (in time) player to the last player so everyone can catch up. The paused players can take this time to do whatever management they want but could not unpause the game.

Or as the last but not least solution is a most radical one. Players can't pause the game on their own except when sync occurs OR there is absolutely no sync and the game moves at the pace of the slowest (least FPS) player.

What do you think?

I think the only multiplayer people would be interested in would be Fortress vs fortress wars and player vs player adventure combat. The big problem is the turns.

vooood

  • Bay Watcher
  • Prophet
    • View Profile
    • Amalis of Daloth (TBA)
Re: What does it take to go multiplayer?
« Reply #3 on: March 10, 2010, 03:05:05 am »

I didn't make this clear. I'm talking only about fortress mode here and each computer would simulate it's own fort! The "server" could only simulate overland movement for armies and nothing else... So lag (or turns) is not a problem here.
Logged
Music was my first love, and it will be my last.
Music of the future, and music of the past.

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: What does it take to go multiplayer?
« Reply #4 on: March 10, 2010, 03:32:56 am »

I didn't make this clear. I'm talking only about fortress mode here and each computer would simulate it's own fort! The "server" could only simulate overland movement for armies and nothing else... So lag (or turns) is not a problem here.

Yes it is.   If player A is getting 100FPS and Player B is getting 2FPS, they will be out of sync and it would be entirely unworkable.
Logged

vooood

  • Bay Watcher
  • Prophet
    • View Profile
    • Amalis of Daloth (TBA)
Re: What does it take to go multiplayer?
« Reply #5 on: March 10, 2010, 03:39:22 am »

Then obviously those two players don't play together. I have seen this in other games, too..
Logged
Music was my first love, and it will be my last.
Music of the future, and music of the past.

Shades

  • Bay Watcher
    • View Profile
Re: What does it take to go multiplayer?
« Reply #6 on: March 10, 2010, 03:52:01 am »

It depends what you mean by multiplayer to be honest. For example co-operative fortress building could be very easily done right now.

Anything more than that mode would take some thought into what you actually wanted to do.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: What does it take to go multiplayer?
« Reply #7 on: March 10, 2010, 04:09:44 am »

Then obviously those two players don't play together. I have seen this in other games, too..

In game world time passes in fortress mode.   If some player is even a few in game days behind another player, then you run into all sorts of problems unless they are always 100% in sync.   This is one of the main problems with having a multiplayer fort.
Logged

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: What does it take to go multiplayer?
« Reply #8 on: March 10, 2010, 04:10:33 am »

The way to do multiplayer with such a complex, but deterministic, game is that the server and clients are in "Lock step". The gist of it is that all inputs that actually *do* anything to the game state are transmitted to the server, then the server packages together a "frame" of everybody's inputs and sends it back to all the clients, along with a "simulate frame" command, and then everybody acts on those inputs at once. It does mean that a clients' own inputs are delayed by one round-trip (possibly plus one frame), but for DF that would be tolerable. The beauty of this approach is that it doesn't matter how many objects are active in the game world, there is still a bare minimum of network traffic going on. Random events are handled by having synchronised pseudo-random number generators. Desync can be detected by having the server send out a random number every frame and checking that it matches on the client.

This is the technique used by OpenTTD, games of which frequently have thousands of pathfinding vehicles going on. Not as intensive as DF, but still far too complex for the server to transmit the position of everything continuously.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

Leotto

  • Bay Watcher
  • Rumplord
    • View Profile
Re: What does it take to go multiplayer?
« Reply #9 on: March 10, 2010, 05:09:17 am »

It doesn't matter how complex it is the only information that needs to travel from the server to the client is visual, and command coordinates on the reverse.
Logged

Retro

  • Bay Watcher
  • o7
    • View Profile
Re: What does it take to go multiplayer?
« Reply #10 on: March 10, 2010, 05:15:43 am »

You could have an observe/control trade, or an observe/observe/control chain trade for what amount to 'live action succession games.' At whatever predecided point in time (or whenever the 'control' player decides if you want to play like that) the game will be passed over. The control player controls the view, the tileset, pausing/unpausing, the interface, everything. The other players' computers would just act effectively like extra monitors. Throw in a small chatbox to the side and that's about as multiplayer-able I can see DF ever getting.

Shades

  • Bay Watcher
    • View Profile
Re: What does it take to go multiplayer?
« Reply #11 on: March 10, 2010, 05:33:36 am »

You could have an observe/control trade, or an observe/observe/control chain trade for what amount to 'live action succession games.'

There is no particular reason why you couldn't except control commands from every player, the only concern would be never leaving pause. Of course to implement than you'd have to decouple the multiplayer interface from the single player game so could ignore pausing for the most part. It wouldn't be too hard to make for those guys that worked on the telnet interface.
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Retro

  • Bay Watcher
  • o7
    • View Profile
Re: What does it take to go multiplayer?
« Reply #12 on: March 10, 2010, 05:53:56 am »

In theory I agree that's possible. In practice I think it's unworkable. Being forced to be paused while someone else does something will slow the game down more than any FPS hit, and imagine having four people playing at once. As patient as people can be, it would grate the nerves just with the pausing alone.

G-Flex

  • Bay Watcher
    • View Profile
Re: What does it take to go multiplayer?
« Reply #13 on: March 10, 2010, 05:56:14 am »

All that, and your reward: A game where the players don't interact with each other in any way.

Also, assuming this would only take a week of development time is rather naive.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: What does it take to go multiplayer?
« Reply #14 on: March 10, 2010, 05:57:49 am »

In theory I agree that's possible. In practice I think it's unworkable. Being forced to be paused while someone else does something will slow the game down more than any FPS hit, and imagine having four people playing at once. As patient as people can be, it would grate the nerves just with the pausing alone.
You're assuming it would still pause whenever someone did anything.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.
Pages: [1] 2 3 4