Skip to content

Current development

Denis Kim edited this page May 19, 2023 · 16 revisions

This page is incomplete. It is still filled with issues. Be patient, and it will be done in the near future.


This page lists planned improvements, bug fixes, unresolved minor issues, and other things that may be changed in the near future. Already done things may be present in this list for convenience of comparing with the past list state, or not present.

Please don't hesitate to propose your changes, new commands, or any info about how you see it should work! As currently the focus is on command manager, it would make sense to add as many commands as possible now.

This page is supposed to be updated once something is fixed or proposed to be improved, but only the future decides whether it will be the case.

Map queue

Map queue existed for a long time before, and allows to put maps into it so that if the queue is not empty, then the next played map is the one at the top of the queue, and when the game finishes, the queue pops one map out. Current development is focused on extending its abilities to map filters of various kind.

Allow pushing a custom map filter:

  • allowing only official/addon maps
  • allowing only approved/not approved maps/other categories
  • — Distinguish those categories
  • — Do not consider all maps without addon_ official
  • allowing only a certain predefined subset of maps (e.g. touring)
  • — Come up with a way to define the subsets of maps, karts, users, etc.
  • allowing only available maps
  • allow to specify if there should be track selection screen
  • allow to specify whether the command should tell the map(s) or not
  • combining the above in all possible combinations
  • Allow pushing a random map for any filter
  • Allow applying "select $n$ random maps from the result" to any filter
  • Allow excluding or including previously selected maps based on absolute or relative game number
  • Allow excluding or including previously selected maps, but make it more efficient (for the cases like removing all / big number of previous maps)
  • .
  • (temporary) Allow pushing a random (addon) map without custom filters
  • (temporary, ?) Add temporary placeholders like - and -addon to the list of the typo fixer for /queue comamnd
  • Get rid of temporary mechanisms
  • .
  • Allow specifying max number of players for a map (as it is currently a part of filter code; is it really needed?)
  • — Consider other things that could be specified when pushing into the queue
  • .
  • Add /queue clear
  • Add /queue shuffle
  • Make a votable subcommand for voting for next track /next (for pushing a track into the queue?)
  • When the mode is changed, change the queue in some way so that maps cannot be used in an incompatible mode (fixing #12 completely)
  • — Consider different options: just skip the incompatible maps? or remove them instantly? or only when they are the next in the order? What if someone changed the mode accidentally?

Default queue

If the regular map queue is empty, one would probably still like to apply a few map filters... and for that, a default filter could be made so that it's always applied. One could also want to apply different filters periodically, so probably it makes more sense to organize those default filters into a default map queue - so that it's only used when the regular, "manual" queue is empty.

  • Add the default map queue

Kart queue

The same as everything above but applies to karts.

  • Allow forcing everyone to have the same kart
  • Add kart queue
  • — Come up with what to do if an addon is pushed, but it's not required and someone doesn't have it
  • (?) Add default kart queue
  • Integrate Kart elimination and the kart queue

Command manager

Command manager is the main part of #5. It allows all the commands to behave in a standartized way, to have common mechanisms of getting help, fixing typos, having votes, etc. Even though technically most of the commands' intrinsics are still located in server_lobby.cpp and currently the command manager only does some common functions for commands, it can later incorporate all the stuff in server_lobby.cpp related to commands.

  • Implement subcommands (including typo fixing)
  • Rewrite some commands to have subcommands: /queue show, /length check, ...
  • Subcommands should be able to have different permissions
  • Rework all command permissions
  • Offer to copy the whole fixed command line when a local command is misspelled
  • (Doubts) Show alias instead of actual command in the voting message if alias is used
  • (Could be already done?) Add aliases to typo fixer
  • Fix Pick one of -1 options using /1, etc., or use /0, or type a different command
  • Decide when to print the message to the player invoking the command (if it wasn't invoked after a vote) and when to all players (currently most commands are intended to show all server changes to all players)
  • Add a command (allow to print alongside description?) to print server's basic settings in some convenient format (specify it in server config if needed?) so that people can know immediately how many slots are available, what is needed to play, etc
  • (?) Remove trailing spaces from commandline (can it accidentally change something that already works?) otherwise there is strange behaviour, e.g. /getaddons with space uses soccer

Command proposals

Command categories

  • Poll commands
  • — How exactly should they work?
  • Auth commands

Single commands / added functionality

  • /randomnewplayers to assign GP teams to newly arrived players
  • Remake /mute (if it isn't done yet)
  • — (Does it happen now?) Current /mute probably doesn't work with absent players (intended by base repo?) - tells to do /0 and then Pick one of 1 options, or use /0, or a different command
  • Show current game result in the lobby with /result
  • — Show count for soccer
  • — Show something for racing
  • — Show count for battle modes
  • — Allow showing some info for multi-game modes (GP, Kart elimination, tournaments, ...)
  • — (Doubt) Add auto notifications on goals/leader change/similar
  • Add parameter to /moreaddons / /getaddons - how many lines to show (think about parameter order)
  • Allow to auto change allowstart (and/or other parameters?) at certain timestamp, without hammers
  • Allow to initialize server with /allowstart 0 being already set
  • Add a command that tells why is a certain player hourglassed
  • Add a command to see certain player's addons
  • (?) Should /getaddons still list all addons available to install, no matter what is allowed to play on the server? (Rather no but it's discussable)
  • Addon count for joining players/those who change their addons in the lobby should be counted only over allowed maps in all commands (for example, if 12 addons are allowed and play threshold is 6, one needs 6 of those 12 addons)
  • (Supposedly client side) Detect outdated addons installed by players and do something about it (ask to update if server config allows / player consents for such messages? don't allow to select them to avoid crashes?)

Bugs / Issues

  • Mark local accounts' messages ingame to avoid impersonation or confusion
  • (Does it happen now?) Fix asterisk usage bugs that happen sometimes
  • Desync was already fixed somehow before, but it occurs again pretty often
  • (Does it happen now?) There may be bugs with TV players (unspecified which)
Speedrunning commands
  • /record should take the current/last used track (or last queried track?) by default
  • Allow showing personal best / gap to PB / gap to record after any run
  • — Fix possible insecurities related to usernames

Voting

Voting could be seen in a few previously made fork versions, however, its possibilities can be extended greatly when there is a common manager for all commands, which allows

  • Allow to revoke any vote
  • Allow to see the list of votes
  • Spectators should have limited voting ability (a separate permission is needed for spectator voting) or even be not counted at all
  • — It's unclear how to handle existing votes if a player moves into/out of the spectate mode
  • Allow voting for number of laps / time somehow (together with the map?)
  • Add votes to /preserve so that if that is set in the config, votes are removed when all players leave
  • Kart elimination voting doesn't work for now (probably image is helpful)
  • .
  • (Does it happen now?) /vote without arguments somehow fails
  • (Does it happen now?) When someone leaves for some reason it doesn't recount everything (or was it a different threshold?)

Crown order and spectating

Crown order is different from the official version, partially due to different behaviour of /spectate command and a few inconveniences in the official implementation of hourglassed players (IIRC).

  • Fix the situation when the spectators are ahead of non-spectators joining later in the crown order
  • (Does it happen now?) Spectators may have problems unspectating (should have been resolved before in one of commits?)
  • Fix the join sound happening when there are hourglassed players

Typo fixer

  • Typo fixer should only suggest available commands according to permissions

Tournament, GPs and related stuff

Before #5, soccer tournaments were held in a separate mode, with own commands. But even if the PR isn't really related to it (except that the commands will have unified format, etc), some things that were previously handling similar things may be united, including some team GP code. There are also some other things that could be useful to implement.

  • (?) Allow choosing between tournament timer and tournament start button in ownerless case
  • Generalize tournament to CTF
  • Get rid of tournament specific things as much as possible
  • Make /team of GP code work like /role in tournament code (so that /randomteams works either way, there may be judges in GPs, etc.)
  • During the $n$-th game of GP, it says Grand Prix standings after $n$ of ?? games, which is incorrect
  • Add more gap-based GP scoring systems
  • Join m_tour_must_have and play-requirement-tracks
  • — (Does it happen now?) It is said that when an hourglassed player pressed start, there is no message and ServerLobby: Too many players and cannot set spectate for late coming players! appears. Not sure about that or whether it happened when attempting to do the above

Database changes

  • Update all table creation queries so that the below changes can be used

Change database schema and code to save the following on the server:

  • player's kart
  • fastest lap per player
  • difficulty
  • player's kart color
  • config
  • map version (update timestamp?)
  • disconnection time if any
  • results from other modes:
  • — Soccer
  • — FFA
  • — — Find out how people end up written in the FFA results twice: once with normal kart, another time as quitter
  • — CTF

Please don't hesitate to propose other things that could be useful when stored in the database, as database schema is not planned to be changed at any arbitrary moment - it takes time to upgrade existing databases to include new fields!

General issues

  • Investigate why servers crash upon closing
  • Investigate why servers don't have IPv6 in around $30%$ of starts

Documentation and comments

  • Fix GP scoring description: 'empty for default' is not correct

Before the #5 merge

  • Remove unnecessary includes and comments
  • Write the command manual (which would be in its greater part a copy of all /help messages)

Miscellaneous

This contains issues that were listed long time ago and are uncategorized. Sometimes it's even unclear from their formulation what they meant back then, but getting rid of them based on that would be strange.

  • Smart pointers don't really work correctly in some cases, causing a few crashes. The same may apply to multithreading. (It's currently unclear whether it's only the fork's problem - IIRC the base version also suffered from it, but it needs more testing and more cases to say anything anyway).
  • Compare update and handleCommand
  • (Probably not server-side) Start timer for ownerless server should preferably behave as if spectators aren't regular players.
  • Should Please specify a correct number etc. around line 2284 be like that or better just to have error(context)?
  • GP server should be configurable unlike in official code (previous experience tells server_config.cpp:435 may have something to do with this)
  • In case REGISTER_SELF_ADDRESS around line 1754, isGP may be not really needed (?)
  • /0, /1, /2, /3, /4, /5 are too funny
  • In places with if (ffa_world etc) probably a virtual method for world that is overridden in ffaworld would be better
  • (Does it happen now?) Some record badges are not shown sometimes (e.g. one of RT4 badges for kimden)
  • .
  • Consider the possibility to make GP working in FFA mode (previous experience tells that small fixes are enough for clients to handle it) and soccer (even if the interface is kind of broken then). Probably it's for client side changes as they prevent useless crashes. Supposedly it doesn't work for CTF.
Clone this wiki locally