Systems
WebsiteGitHubGitBook
  • πŸ•ΉοΈSystems Intro
    • Game Controls
    • User Interface
    • Item Sprite Generation
  • πŸ“¦Asset Data
    • How Asset Data works
    • Using Asset Data
    • Creating an Asset Database
    • Known Issues
  • πŸ“‘Traits
    • Containers & Items
    • Roles
  • πŸ”«Gamemodes
    • Adding objectives
    • Adding game modes
  • πŸŽ₯Roles
    • Adding a new role
    • Adding a new permission
  • πŸ–οΈInteractions
    • Interactions Guide
  • 🧰Containers
    • Using containers in game
    • Setting up a container
      • Fields description
      • Networking a container
      • Custom storage conditions
    • FAQ
  • πŸ‘œInventories
    • Developer Guide
  • πŸ—ΊοΈTilemaps
    • Creating Maps
    • Adding new items & objects
      • Adjacency Connections
    • Technical Implementation
    • Refactor notes
    • Interface
  • πŸ’Entities
    • 🩲Character Customization
  • πŸ›‹οΈLobby
  • πŸ› οΈCrafting
  • πŸ’¬Chat
    • Channels
      • Department specific channels
      • Distance based channels
  • πŸ“£Audios
  • πŸ”ŽExamine
    • How it works
    • Setting up a game object to be examinable
Powered by GitBook
On this page
  • Syncing sound
  • Purging sound

Was this helpful?

Edit on GitHub
Export as PDF

Audios

In SS3D, audio uses a single class to manage most sounds, it's the audio system.

The audio system handles creating and destroying audio sources, putting those sources on the right game objects and syncing sound between clients.

In the vast majority of cases, you should never add an audio source yourself to a game object, but instead you should use the audio system.

One of its perk is that it's reusing already existing audio sources that are not playing anymore, instead of adding a new source everytime something needs to play a sound.

It's also maintaining an healthy amount of audio sources by limiting the maximum amount allowed on a single client.

Syncing sound

It should be noted that in order to sync sound between clients, the audio system put audio sources on game object with a network object component. This is an easy way to find the same game object on the client. However, a restriction of that solution is that you should not put more than one audio source per network object.

Purging sound

After a while, if no sound is played, an audio source gets destroyed. This is better for performances.

PreviousDistance based channelsNextExamine

Last updated 1 year ago

Was this helpful?

πŸ“£