Project

General

Profile

Feature #2015

Remove server-side audio system

Added by danij almost 5 years ago. Updated 4 months ago.

Status:
Progressed
Priority:
Normal
Assignee:
-
Category:
Redesign
Target version:
Start date:
2015-04-22
% Done:

50%

Tags:

Description

Servers do not need to playback audio. On server-side all audio can be boiled down to much more concise "remote event scheduler". As such, there is no need for a audio system because remote event scheduling can and should be generalized for any purpose.


Related issues

Related to Feature #1757: Separate server and client sourcesNew2014-04-18

History

#1 Updated by danij almost 5 years ago

  • Tracker changed from Bug to Feature

#2 Updated by danij almost 5 years ago

  • Related to Feature #1757: Separate server and client sources added

#3 Updated by skyjake almost 5 years ago

There is already the "logical sound manager" code that handles audio also on the server. Are you thinking of something different here? At least in the past, it has been necessary for some server-side gameplay code to know whether a specific sound is still playing or has been stopped.

Here's a scenario worth considering:
  • The server should only send deltas to the client about sounds audible to the particular client.
  • If a long-running/looping sound is started far away, how will the server know when a client is close enough to the sound for it to become audible and then send the appropriate delta?

#4 Updated by danij almost 5 years ago

I began working on this several months back in a local branch in which I have already achieved the following:
  • Introduced an AudioSystem on client side for managing systems and components used for playback
  • Made all components used for playback client-only

In the next phase my plan is to revise the "logical sound manager" design, specifically regarding client/server separation. While there is certainly some overlap here there is not enough to justify the model used presently. Furthermore, one has to consider that a client may not be using the same sound samples as the server.

Scheduling sounds on server side is fundamentally a map-domain concern. A generalized system could be used for scheduling all manner of client side effects.

#5 Updated by skyjake almost 5 years ago

  • Tags set to Server, Audio

danij wrote:

I began working on this several months back in a local branch

Ah I was unaware of that. It would be nice to see some issues here in the tracker regarding that work (and other local work you might have ongoing).

Also, does this so far have any relation to the audio classes in libgui (Sound, Waveform, WaveformBank)? My hope was to (re)build the client's audio playback on these.

#6 Updated by danij almost 5 years ago

skyjake wrote:

It would be nice to see some issues here in the tracker regarding that work (and other local work you might have ongoing).

I've got a few different branches on the go, covering a variety of different things :) Once I've cleaned up these branches, I'll push them to the repo and add issues to tracker if missing (although, most of what I've been working on is already covered by existing issues, at least loosely).

skyjake wrote:

Also, does this so far have any relation to the audio classes in libgui (Sound, Waveform, WaveformBank)? My hope was to (re)build the client's audio playback on these.

Thus far I've tried to avoid making too many changes at component level. Its mainly been about high-level architecture and reorganization.

#7 Updated by skyjake almost 5 years ago

  • Target version changed from 42 to 2.0 – Home UI & Packages

#8 Updated by skyjake over 3 years ago

  • Status changed from In Progress to Progressed

#9 Updated by skyjake over 3 years ago

  • Target version changed from 2.0 – Home UI & Packages to 2.1 (Late 2018)

#10 Updated by skyjake over 1 year ago

  • Target version changed from 2.1 (Late 2018) to Multiplayer

#11 Updated by skyjake 4 months ago

  • Assignee deleted (danij)

Also available in: Atom PDF