Skip to content

Current development

Denis Kim edited this page Apr 9, 2024 · 16 revisions

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 (this parameter should be global and overridden by the queue)
  • allow to specify whether the command should tell the map(s) or not (this parameter should be global and overridden by the queue)
  • — Keep in mind that when something is pushed in advance, telling (or determining the random maps if they are not even told) can be at the time of pushing, or at the time before that game, and in the latter case, it should be done when the previous game has ended and the server is reset. It may require a bit more code
  • 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
  • Queue should show the size
  • 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
  • Fix / investigate if it's related: Addon karts became normal client-side but tux hitbox + medium class server-side (caused by either b5eeb68 or a582102)
  • Fix / investigate if it's related: Intense lag spikes for a short time period (sometimes during the whole game)

Other/combined queues

  • Implement combined actions for queues (kart + track), except pushing
  • Which other queues are needed? Do they need to be a single queue or combining should be only done using a single push command? For example, it is inconvenient to push track and direction at the same time, but also making a separate queue for length of game seems a bit too much
  • - for length
  • - for direction
  • - for other restrictions like slots, max number of players on a map?
  • - for different configs?

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 (for example, /slots and other commands listed above are not invokable ingame)
  • 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 the GP scoring, how many slots are available, what is needed to play, what's next in the queue, etc.
  • — Maybe description should print anything specified in the config format, including server parameters and files, and then the current (simple) description could be made a usual text/file command that can be also printed inside the new description?
  • (?) 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
  • Do not store all commands from data/commands.xml in that file, as adding your own commands would cause /version to be dirty even if the code is the same (make a separate file which is .gitignore'd in advance or is stored outside of code folder?)
  • Merge network console commands and command manager commands (including quitting server, etc.)

Command proposals

Command categories

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

New commands/options

  • /randomnewplayers to assign GP teams to newly arrived players
  • 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
  • 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 or otherwise limited (for example, having a Kart elimination limit)
  • Add a command to see certain player's addons
  • Allow to formally add a map using a hammer/superuser command (to avoid restarts only to bring v1 of an addon - later versions just update the addon contents, not the fact it exists)
  • Add a command for server admin (report-type) message - current SQL query that is needed for that is hard to remember
  • Add restart and restart-if-empty commands
  • /id command, same as checkaddon but simply giving the id (with typo fixing of course)
  • /addons but only count
  • Allow grep over addons printed - or over files
  • (Doubts) Allow to use a command like "I want to stay on the server but I'll be away for $n$ minutes", and then the server doesn't kick the player from ingame or from the lobby. It probably differs from usual /spectate in the way that you can have a /spectate effect when being ingame - not sure it is needed
  • Add hitbox thresholds to server config so that overly big and / or small karts are not allowed server-side (client may use them but for server the hitbox will be tux / anything else? / specified?)
  • Reset command for soccer
  • (Possible only if kart changing ingame is possible) Kart elimination for soccer - each goal the opposite team gets a gnu more (for ctf, each flag?)
  • Add a command to install last several addon maps / karts used (for karts, it's clear that there may be several per game). This could help installing those karts which are used by certain set of players on a constant basis

Add functionality to existing commands/options

  • 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
  • Add parameter to /moreaddons / /getaddons - how many lines to show (think about parameter order)
  • Add parameter [player] for those addon query function which are used to check your addons (think about parameter order)
  • (?) 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?)
  • Add language to CommandManager context
  • — It should be possible in the future to translate messages used in CommandManager
  • If the mode is switched from non-team one to team one, players are currently colored using screen order including spectators (and hourglassed players too? Not sure), which is wrong as teams can have different size
  • Color newcomers in team modes into a weaker team color if the team sizes are equal (or into a random color?) (server_lobby:4551)
  • Allow loading a few tracks from separate folders (specify them in the config file? or in command line argument?)
  • Allow to change physical config with server command
  • — powerup file
  • — kart characteristics file
  • Add different track selection voting methods (standard, random over all, more?)
  • Hammers should be able to enforce start in ownerless mode too
  • Allow specifying kart category / set for server bots in server config or command line option (unlike now when they can only use all standard karts - could be changed for certain standard karts, or for a server requiring addons it can be changed to certain addons)
  • — It could be useful to be able to clone standard karts into another folder, give them better characteristics and allow for use only by bots
  • Allow to disable CTF hit reset to players without flag
  • Allow to disable CTF hit powerup deletion (to players without flag?)
  • Allow to randomize FFA starting positions distribution among players online
  • Make most parameters changeable by hammers or superusers, if it is allowed in the config — and also allow making some allowed things forbidden in the config (how to not make it with too many lines?)
  • — Addon requirements
  • — Time to kick idle players if kicking at all
  • — Everything else?
  • Change artist debug checkline crossing message so that there is kart number — for the ease of processing after the race
  • Add /everypas, make it sortable
  • /randomemoji

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 (maybe caused by a new bug? Not sure)
  • (Does it happen now?) There may be bugs with TV players (unspecified which)
  • Sometimes you can try to install a missing addon but it's already installed (example), to fix that you need to /uninstalladdon first - how to reproduce? It is also said that it happens when a player modifies the folder with addons manually, and also that offline those maps are not available too
  • /addonrevision is said to be invoked server side instead of client side, so it fails
  • Leaving and rejoining battle too fast can lead to a message saying there is no place in the arena / the game has ended
  • /scoring, /length, /queue without parameters should print the current value of the setting
  • — Check if default scoring works correctly
  • (Does it happen now?) <max-players-in-game value="0" /> used to take wrong value when using a template config
  • — Check other commands that take such values from template config
  • (Proper testing needed) /randomteams used to crash when used at the same moment as someone else joining
  • If there is no starting positions, put the kart at least somewhere in the map
  • — When that is implemented, technically, the limits of 10/14 slots can be removed completely. Speaking honestly, those limits already do not take anything about maps into account, some maps have more player slots. Instead, if the karts are not put randomly into the arena, the server should only allow those maps which fit this number of players
  • (Doubt) When not preserving laps, reset to what is written in server config, not to default -1 -1 (should it be done for queue/replay too? or rather allow to specify to what to reset?)
  • (Doubt) Don't allow tracks that don't have reverse, with /direction 1
  • (Doubt, probably won't be fixed?) Using a /start command shortly after (in terms of server time) the actual /start produces You don't have permission to invoke this command
  • Queue filter push can make it No tracks for playing upon start button click - when push_back/pop_back (not sure) and when someone doesn't have maps or installs them (apparently happened when all players individually satisfy the requirements, but together they don't, and the start button was pressed at least once)
  • (Seems like not needed with subcommands?) Rename /shuffle (which sets if the GP grid is shuffled or sorted by points) to avoid confusion with /queue shuffle
  • Add a separate class for GP scoring systems and avoid hardcoding them in ServerLobby::loadCustomScoring
  • (?) Remove /queue show and /length check for the reason that the base functions do the same
  • /timeout command doesn't work
  • Categories should be able to be processed in almost all places where usernames can be
  • Technically, servers with 1 playable slot could have the same functionality as singleplayer (speedrun) servers, but I'm not sure it's good to merge them completely (imagine voting for 1 slot and suddenly the crown gets more permissions?). Maybe the solution is to just allow singleplayer (half-singleplayer?) permissions to all players of only-host-riding servers, extend it to full singleplayer permissions when slots = 1, and to separate only-host-riding from slots completely.

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/hourglasses 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; also an example of probably strange kart choice) - and also probably the format of the message isn't the best
  • .
  • (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?)
  • Votable commands' (in particular, /slots) votability should be specified in the config
  • Bots shouldn't be counted when voting. Example, /slots 1 result, /slots 2 result

Crown order / spectating / hourglassed players

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
  • Spectators should be able to choose if they want to watch the games or not (technically it implies the name for them should be rather 'away' players than 'spectators')
  • (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
  • After switching from battle to racing (or generally between modes), some players may be hourglassed for no reason. Examples: jonny12x was hourglassed here after Battle Island, +2 more example when 14th or even 13th player(s) were hourglassed.
  • When everyone in the lobby is in spectate mode (supposedly in ownerless server) and one player does /spectate 0 and then goes back from kart selection with ESC, that player is still in spectate mode (but not other players)
  • Should livejoin into "Install X addons" game be allowed for everyone? (I think yes (and this is the case now), they don't influence the choice anyway)
  • (Does it happen now?) It is said that sometimes when slots are 8, people out of slots can livejoin the game anyway (but after the case when it happened, no one of 6 spectators couldn't livejoin)
  • Hourglassed crowned player gets no message when pressing start (both on singleplayer and regular servers)
  • (Does it happen now?) When someone spectates a soccer game, some players might be unable to change teams (while some other might be able at the same moment). Example: kimden cannot change team, Alexander is red
  • Sometimes, [error ] ServerLobby: Too many players and cannot set spectate for late coming players! spams all the time when the ownerless server is empty

Typo fixer

  • Typo fixer should only suggest available commands according to permissions
  • Make it easy to remove typos from a few options only (like a|b|ccccc|ddd)
  • Add another typo fixer for categories to remove them fast and to be able to use * for that purpose
  • Do not check categories as typos of usernames (like in /cat+ category #B)
  • Tournament players (or any player specified in the config?) should be included into typo fixer even if they left the server

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
  • — Unite rules of map selection, e.g. in some cases voting should be allowed to certain teams only
  • — Join m_tour_must_have... and play-requirement-tracks
  • — Something else?
  • 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
  • Clarify format for /scoring - currently only ints are allowed and it's kind of strange
  • — (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
  • Fix a confusion when the tournament rules and the server config itself tell game 0 to be of different targets
  • Allow to refer to teams like to categories (#example) and expand the usage of # (for all GP teams, and an easier method for Red/Blue for soccer)
  • — Add something like #ALL category to refer to all players
  • (Does it still happen? Probably no!) When only one team is choosing the map, the server waits the full possible time regardless of choice
  • (Does it still happen?) (Is it a problem?) When changing the player's role and it succeeds but the players doesn't have enough addons, it doesn't say anything in the log
  • Fix the teamchat of non-team players possibly interrupting referee screen
  • Fastest lap points sometimes don't work
  • Scoring sometimes bugs in an unexpected way

Database changes

  • If a local account player quits, the corresponding database record does not have *: picture
  • 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
  • team (currently using kart color — should it be denoted by name or number?)
  • 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, comments and cleanup

  • Fix GP scoring description: 'empty for default' is not correct, and also it's not like only fixed and inc are available (note: even more modes could be added)
  • Fix help for /team (note: when merging tournament and team code, the help may change)
  • Review data/commands.xml (and other files that contain command descriptions if any) and check that every command has correct description
  • /slots 0 is probably not allowed even tho help says it is - either the help needs to be fixed, or chat servers should be actually /slots 0 instead
  • troll-min-normal-speed has wron_way in description
  • direction is not listed in preserve config option help
  • Clean up usage of strings "kart", "map", "track", "arena", "field", "soccer"(s), synchronize them in getAddonPreferredType

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)

Great projects

This section contains things that probably are not going to be implemented soon, still they should be listed here.

  • Marathon racing
  • — Allow changing kart
  • — Allow changing driver
  • — Allow selecting length not fitting into int8
  • Other tournament formats for any mode (or any mode that is team-based / vice versa)
  • — Generalize the format, and then implement a few so that others can be implemented likewise
  • Several lobbies per server if configured in the settings
  • A mode for qualifying / free practice where players are ordered by fastest lap

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)
  • (Is it needed?) Rename binary to not coincide / better differ from base version
  • Investigate when and why the servers start resetting themselves to the initial state (after the game) very slowly
  • Allow specifying default durations of soccer games (battle too?) in server config or addons themselves
  • — (Doubt) Make default (when not chosen) soccer duration not 3 but either 10 or the default duration (10 can be done outside of the code)
  • (Upstream?) Links with ampersands (or some other chars?) are not properly clickable - the clicked part is cut up to &. Or does it depend on where to click? Example
  • (Does it happen now?) (?) It is reported that "Colors may bug" (unknown which colors) - at the same time it may be just someone changinc GP colors during the game
  • Fix a strange occurrence of IP:PORT doesn't exist anymore in server
  • If shuffling the set is used somewhere else apart of track_filter.cpp, make another function in random_generator.hpp to not repeat
  • .
  • 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.