Crazy ideas time: network playing

Algorithm next:

  1. Server load world.
  2. Client(s) connect to server.
  3. Server transfer all world data (json | gz)
  4. Client (unpack) load data to all structures (overmap, submaps, player, etc)
  5. Server send “turn” signal to player
  6. Player has some seconds to turn. Other players wait or plan actions. If action is planned player turn instantly. If time out then player wait.
  7. After turn player send action to server.
  8. Server verify action and return changed data (json)
  9. Client merge data from json
    10 Goto 6 if moves > 0
  10. Goto 6 for turn next player
  11. Turn for zombies etc.
  12. Goto 5


  1. Separate ui, action and data logic. Schema:
|       client       |                      | server  
 UI<->Control <- interface -> Data

Interface has two work mode - for local playing and remote.
2. Add state_id for all structures (for check changes)
3. Some fixes with serialize interfaces

It is real, but ton of work.

Except for the part where players can trigger activities that take many hours of in-game time to resolve, and the game being basically impossible to play if you only have a few seconds to take your next action.

You could make a multiplayer dda, but by the time you’re done it would either be terrible or only remotely resemble dda. I’d strongly suggest starting from scratch, especially since the game loop isn’t remotely suited for multiplayer, so you’d basically have to throw that out too.

One thing that might be worthwhile would be to build a multiplayer dda-alike that can consume dda json for item and monster definitons.

I think a prerequisite to multiplayer CDDA would be a realtime CDDA. It would necessitate turning the current action system on its head, so that the clock drives the game, and the player only gives commands and waits until the actions resolve (i.e. like in Dwarf Fortress). Then you could make headway towards making simultaneous multiplayer work.

If Kerbal Space Program can have multiplayer despite time-warp, I think it’s feasible that CDDA can have it too.

[spoiler=some useless info]actualy its possible to play cataclysm multiplayer but you cant see other players and can cause desync

2 players go to this same place
player 1 enter this place first
player 2 enter this place second
player 2 loot everything
player 2 save game
player 1 save game
both players go away
place is still full of loot because player one loaded it first and saved last[/spoiler]

well i think its possible to make multiplayer without changing whole game, of course we talk about small game with friends/fellow survivors not great mmo

turns are speed right?
so maybe do something like this?:
server wait for players to input command
all players input command (if someone do not do anything for [insert time here] he skip his turn
players and monsters move
server check if any player or monster have speed higher than 0
players with speed higher than 0 input commands
players and monster move
server give speed to players and monsters