USC Multiplayer Protocol Documentation

The USC Multiplayer server uses JSON packets with topics.

Each packet consists of a serialized JSON object with a topic field. This topic field will direct the packet to the correct subscriber.

This documentation lists defined topics for both the server and the client as well as their fields and other information.

To see how to JSON send packets over the network see tcp_protocol.md

Table of Contents

Server.proto

Top

These are the packets a client can send to the server

Unathenticated users can only send user.auth

room.game

Start the game, triggers a 6 second countdown

room.host.set

Change the room's host

FieldTypeLabelDescription
host string required

The UUID of the user to make host

room.leave

Leave the current room

room.option

Toggle host rotation for the room

room.score.final

Tell the server the user's final score

FieldTypeLabelDescription
score int32 required

The user's final score at the end of the game

combo int32 required

The user's max combo during the game

clear int32 required

The user's clear status for the game
0: Exited
1: Failed
2: Clear
3: Hard Clear
4: Full Combo
5: Perfect

room.score.update

Tell the server user's current score

FieldTypeLabelDescription
time int32 required

The map time for the last score tick

score int32 required

The current score at the chosen score tick

room.setsong

Select a song as host

Future: This will be changing to better find songs

FieldTypeLabelDescription
song string required

The folder name of the selected song

diff int32 required

The index of the chosen difficulty

level int32 required

The level of the chosen difficulty

hash string required

Selective hash of the song file (0x8000 bytes) *Deprecated

audio_hash string required

Selective hash of the song file (0x8000 bytes) *Deprecated

chart_hash string required

Normalized hash of chart file (see USC for more details)

room.update.get

Have the server send the lobby status. Responds with room.update

server.room.join

Join a room by a given UUID. Responds with server.room.join

FieldTypeLabelDescription
id string optional

UUID of the room to join

password string optional

Password for the string if has one

token string optional

Use a token instead of and id and password to join a room

server.room.new

Create a new room and join the user as the host

FieldTypeLabelDescription
name string required

Name for the room

password string optional

Password for the room

server.rooms

Have the server send the client the list of rooms. Responds with server.rooms

user.auth

Authenticate the user. Responds with server.rooms

FieldTypeLabelDescription
password string required

Password to authenticate with Future: This will be moved to a digest system

name string required

The display name for the user

version string required

Current version of the client

user.extra.set

Attach or update a string of extra data to your user

FieldTypeLabelDescription
data string required

The data too attach. The specific format of this data is user defined

user.hard.toggle

Toggle the excessive rate for the user

user.mirror.toggle

Toggle the mirror option for the user

user.nomap

Tell the server the client could not find the map

user.ready.toggle

Toggle the user's ready state

user.song.level

Select which level the user is playing

FieldTypeLabelDescription
level int32 required

The level to play

user.sync.ready

Tell the server that the client is ready sync