FAForever / FAForever/server

Things to change for a protocol v2

Abierto
#573 6 comentarios 0 reacciones 0 asignados Ver en GitHub
proposal
Lenguaje dominante
Python
Estrellas
72
Forks
84
Merge medio
5 h 11 min
PR fusionados (30 d)
1

Descripción

I'd like to start keeping track of things we want to change in a new protocol.

### Stuff to remove
- [x] Remove `QDataStreamProtocol` #816
*It is pointless, everyone hates it.*
- [x] Remove all modvault functionality #816
*Only the legacy client still uses it. All clients should use the API instead.*
- [x] Remove `create_account` command completely #816
- [x] Remove `id` and `login` from the welcome message. #816
*Use corresponding attributes on the `me` object instead*
- [x] Remove `mod` from `game_matchmaking` command. #816
*Use `queue_name` instead.*
- [x] Remove `faction` from `game_matchmaking` command. #816
*Use `set_party_factions` instead.*
- [ ] Remove password based authentication
*Use token instead*
- [x] Remove `init_mode` from `game_launch` command. #816
*Use `game_type` instead.*
- [ ] Remove `kick` and `kill` styles from notice messages
*Use a dedicated administrative command instead*
- [x] Remove search boundaries from `matchmaker_info` message #816
- [x] Remove `irc_password` command
*IRC authentication will use tokens from the API*
- [ ] Remove `global_rating`, `ladder_rating`, and `number_of_games` from `player_info` message.
*Use `ratings` instead*

### Stuff to change
- [ ] Rework `command_avatar`
- [ ] Rename action `list_avatar` to `list`
- [ ] Return avatar id's in avatar list
- [ ] Select avatar via id instead of url
- [x] Move from UTF-16 to UTF-8 #629
*We are just wasting bytes*
- [ ] Move the protocol to websocket, choose a websocket subprotocol (e.g. STOMP?)
*This would allow more web interactions*
- [ ] Guarantee that every message is a json dictionary (not a list)
*Simplifies parsing*
- [ ] Change all unix timestamps to ISO timestamps. For example `launched_at` in `game_info`
- [ ] Remove or rework `ping` and `pong` commands? Maybe only send them if no other messages have been sent
- [ ] Rework `game_info` so that messages are not sent sometimes as a list and sometimes as individual games
- [ ] Use player id instead of username in `game_info` teams section #812
- [x] Don't send `game_launch` message when match is cancelled #816
*Handle `match_cancelled` instead*
- [ ] Rework `command_ask_session`
*What is the point? What does the policy server use this for? Can it be removed?*

### Stuff to add
- [ ] Add message Id to every message (or a message envelope)
- [ ] Add request Id to messages that are a direct response to other messages.
- [x] ~A way to tell when a player has left an ongoing game (player dies but game is not over).~ #831
- [ ] Matchmaker match confirmation #607
- [ ] Add a way to check supported protocol version of clients

### Fancy features
- [ ] Auto-generate documentation or describe protocol in a formal language that allows creation of code in multiple languages
*Use dataclasses to describe message fields*

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.