SuperTuxKart is a free kart racing game.
The SuperTuxKart homepage can be found at https://supertuxkart.net/.
The software is released under the GNU General Public License (GPL) which can be found in the file COPYING
in the same directory as this file.
Building instructions can be found in INSTALL.md
To compile SuperTuxKart 2.0 and/or STK TME, you will need to install custom assets instead of the ones detailed in INSTALL.md . Check out the releases tab for the latest version.
STK TME is a SuperTuxKart mod by Nomagno that introduces some limited race simulation elements, namely arcade versions of tyre degradation and fuel systems. Its overall aim is to arrive at configurable and that can improve long (6 laps all the way to 200 laps) races and provide more opportunities for tournament formats and friendly competitions. It is not concerned with casual players in its default configuration, though it makes sure not to make any casual-unfriendly choices that can not be disabled easily enough through configuration files or the (currently very primitive) in game UI.
A summary of the information below can be found in a new "Tyres" tab in the in-game help menu.
Features:
- Backplunger patch: In STK 2.0 and 1.0, the plunger item, when shot backwards, blocks the hit player's viewport. This sucks. It has been changed to instead remove the items of the hit player. It hence changes from an annoying item to a disarment item if the player behind takes too long to aim their cake or bowl.
- UI: the tyre compound code (or PIT if pitting) is shown on the leaderboard on the top left, inside the kart icon. The tyre lifes in bar form and the fuel are shown in the bottom right in this order:
traction turning fuel
. These bars/meters will show their 0 position as the configured minimumkart_characteristics.xml
, and will not go below their 0 position. However, know the tyres can and do degrade more even when the bars don't show it! However, if both degradation bars are empty, it's very likely you should pit for new tyres if possible. The fuel is replaced by desired fuel to refill during fuel pit stops. - The tyres: the main tyres are:
- Soft (ID 2): Starts out VERY fast, but also degrades very fast, specially by high-speed turning (in Hacienda, one of the least demanding tracks on tyre degradation, it can be useful for around 5 laps only if you don't manage it)
- Medium (ID 3): Starts out at the kart's normal speed, and degrades at a normal rate.
- Hard (ID 4): Starts out at a lowish speed, gets slightly faster as it warms up, and then degrades very slowly.
- Flat (ID 10): It does degrade but it has no effect in the kart's speed, meaning it effectively is the same as disabling tyre degradation.
- The rest of the pre-assigned tyre IDs are yet to be used for anything. The maximum number of tyres can be easily expanded from 10 in any case.
- Full online support. Obviously, though, the server must be compiled from TME as well.
- Initial tyre compounds (the ones you have when you start the race) are configured by changing the player colour (the formula is
compound = color%(numberOfDefinedCompounds) + 1
, where there are 10 defined compounds by default. More easily explained, color 10 is compound 1, color 19 is compound 10, and at color 20 it loops back to compound 1 again, and so on. Colors are 1-100). - Fuel can be configured offline from the race setup menu, and online from the wrench icon in the server lobby. Initial fuel can not be configured on a per-player basis yet.
- Tyre compounds, configurable from
kart_characteristics.xml
with the response curves generated with the help of thecompound_response_curves.ods
spreadsheet. Each compound has several parameters:- Traction tyre life: reduced by two factors, the current speed being a minor factor and the current front-back center of mass (or
centerofmassY = mass*acceleration
) being a major factor. The acceleration used is the smallest acceleration from the current time instant to the latest past 6 speed snapshots taken 0.3s apart. In spite of this, changing speed passively by using too many boosts without spacing them out adequately, or braking too hard, can still affect the degradation noticeably. Going offroad and braking multiply the degradation rate of the tyre life by a configurable factor. Additionally, a mode can be enabled where bumping into track obstacles reduces the tyre life by a fixed percentage (part of the gradual braking mitigation talked about in the 2.0 section along with the offroad muliplication). - Turning tyre life: degrades faster based onthe the center of mass left-right of the kart, taken as the mass times the centripetal force the kart is experiencing right now (
centerofmass X = mass*(speed^2)/turnRadius
). Multiplied by a configurable factor when skidding. If the track bumping penalty is enabled, it will also be reduced by the same percentage as the traction life. - Transfer: turning limiting transfer is how much the traction tyre life is degraded for each 1% of the turning degradation, when
turningLife < tractionLife
. The regular transfer is the same, but for whenturningLife > tractionLife
. Same for the traction limiting and turning transfers. - Topspeed, traction, and turning response curves: each compound can react differently at each percentage of its tyre life by reducing/increasing the kart's traction and topspeed (different curves both using the same traction tyre life) and reducing/increasing how much the kart turns. These curves can be seen as functions affecting the kart stats dynamically
finalStat(Percentage, baseStat) = baseStat*curve(Percentage)
orfinalStat(Percentage, baseStat) = baseStat - curve(Percentage)
. It can be configured if the numbers in these curves will be substracted from the base stat, or multiplied by the base stat. - There are several parameters concerning how the temperature and hardness of the tyres varies. I know enough thermodynamics to implement these, and even read a couple engineering books to understand better, but I have decided it's honestly not worth it to simulate the tyre heat transfer and subsequent thermal degradation and reaction. One of the main reasons for this is STK tracks are so wildly different that already without thermal simulation you need at least 5 or 7 compounds to really cover all tracks optimally and have some varying strategies in each track, so if you consider which tracks warm the tyres up more or less the number would skyrocket beyond practicality.
- Traction tyre life: reduced by two factors, the current speed being a minor factor and the current front-back center of mass (or
- Tyre allocation: During a race, the current tyre allocation will be showed as a table of compounds
S M H
and numbersXXX XXX XXX
, above the tyre life and fuel bars. It can be configured before the race. The allocation has the following meaning for each compound:-1
is the same asINF
, and it means that any amount of tyres can be used.0
means that no tyres of that type can be used anymore for the remainder of the race.X
where X is a number greater than 0 means that the tyre can be used X more times. When you use a tyre changer, the allocation of the corresponding compound will be reduced by 1. If you try to pit for a new tyre of a specific compound when you have none left, you will receive a 20% tyre life tyre, which is basically useless, so be careful! Can also be configured by the server host with the wrench icon, along with the fuel settings. - Tyre changers: they will, when passed over, change your tyres to a fresh set. They have the placeholder model of an easter egg. They can be added in the same place where the items and nitro are in each track's
scene.xml
, in the form<tyre-changer compound="1" stop-time="30" id="tc0" x="234.35" y="44.3" z="24.5" h="20">
where the parameters configure respectively the compound ID, the pit stop time penalty applied to the kart, the unique object id (must be unique and different from the other nitro and items!), the xyz coordinates and the height from the ground (I think!). I recommend simply using the coordinates of an existing object if you do not know how to use blender to position the tyre changers, though basic geometry can allow you to position them decently enough if you use the coordinates of known items to construct their positions. - Fuel pumps: tyre changers with compound ID 123, which is specially reserved to indicate a fuel pump. When going over a fuel pump, a fixed time penalty will be applied. During this time penalty, in the UI your fuel will instead be replaced by the fuel you wish to put into the kart. You can hold the nitro button to increase this amount, though careful you don't run out of time to input your desired number because it will loop over at 1000! The amount of liters will be put into the car at the fuel pump speed (see below), so will still be slow until the tank is full! Note you can input 1000 liters even if your tank isn't empty. The tank will still top out at 1000. Your time penalty will still take the wasted fuel into account, though, so 1000 liters at fuel speed 1 will still take 1 second even if only 500 were actually put into the kart. This will probably be fixed in the future.
- Fuel parameters:
- Max fuel: it's always 1000, the fuel tank capacity in liters.
- Starting fuel: From 1-1000 liters.
- Fuel rate: How energy demanding the engine is, in liters/kilometer. Put more simply, 1km (roughly 1 lap in the track Hacienda) will consume 1 liter of fuel at fuel rate 1, and it will consume 1000 liters or the entire fuel tank at
- Fuel weight: the density of the fuel, in dg/l. This is, at weight 1 a full fuel tank weighs 10kgs (the kart Tux/medium kart class weighs 262kgs, for referenece), and at weight 100 a full fuel tank weights 1000kgs, meaning the kart can barely even get going. NOTE THAT THE MORE FUEL WEIGHT, THE HIGHER THE KART MASS, AND THE HIGHER THE TYRE DEGRADATION!
- Fuel pump speed (in the UI, simply called fuel stop): IT'S NOT REALLY A SPEED, LOOK AT THE UNITS: milliseconds/liter. 0 means there is no penalty for putting 1000 liters into the tank. At pump speed 1, 1000 liters will take 1 second. At pump speed 1000, 1000 liters will take around 20 minutes (!!!!!!!).
- Fuel regeneration. Fuel consumption will be half when you release the throttle. When the throttle is released, deceleration (calculated in the same way as the acceleration for tyre degradation, but only considering it if it's negative) will make the engine regenerate fuel/energy. If the fuel weight is 0, this is equivalent to an electric system. If fuel weight isn't 0, it's some fantasy thing lol. You can expect to regen roughly 0.2-0.5 fuel per kilometer in a reasonably tight track without TOO MUCH (still quite a bit) time loss at fuel regen 1, and around 200 at fuel regen 1000. So roughly one fifth of fuel rate at any given value.
SuperTuxKart 2.0 is the upcoming verion of SuperTuxKart, and its development branch is used (along with upstream merges) as the basis for the TME.
For SuperTuxKart 2.0, one of the main points of interest was identifying weak points in the balancing that was done for the 1.0 release, and fix them. This process is still ongoing, but the initial positions that were taken by Alayan after the evaluation process of pro-level gameplay trends are these:
- The karts handle too well, to the point only a couple dozen of tracks out of the several hundreds developed in STK history have truly been optimal for 1.0 light class' insanely good acceleration and turning. As a result, the vast majority of tracks are best played competitively with medium, but mostly heavy karts. A minority of players even considers the light kart a handicap in its current state. This is further exaggerated by the fact a majority of standard tracks favour heavies, and only two (XR and Minigolf) can actually
- The rubberbanding is inconsistent and weak. The players in the back are given boosts, and if the players are not very good, they will naturally crash and lose even more time. The players in the front are given weak and defensive items that mostly allow them to defend from any attempts to pass or from basketballs, and make for uninsteresting gameplay even for the ones in first. The specific probabilities of receiving each item at each position are such that quite frequently there will be ridiculously lucky or unlucky streaks where a player in first that isn't supposed to get many zippers will get enough to cement their lead for the rest of the race, or a player in the back will get no help and be left to dro peven further behind.
- There is a distinct lack of boosts. This has led to STK 2.0 being called "the boost update" by some (What? Just me? Okay...).
- There are several inconsistencies with the item system and questionable choices when a game must allow both skillfulness and for everyone to win.
This said, Alayan's choices and the lack of available testers so far has resulted in a meta that is much more tailored to making mistakes as well as comebacks more easy. If I may use as a comparison STK's distant cousing project Sonic Robo Blast 2 Kart, STK 2.0 seems to be shaping up to be to STK 1.0 what Dr. Robotnik's Ring Racers has been to SRB2Kart, an update that raises the skill ceiling and is only incidentally balanced to not leave behind the casual players.
A quick run-down of the added, removed and modified features with a rough crediting of who came up with them (mostly to leave written down somewhere which I participated in lmao). A fitting name for this update might also be "The Technological Update" based on what is to come. Note most of this was implemented by Alayan regardless of the design credits, except when noted otherwise:
- New item: Nitro Hack. This item hacks the karts in front, stealing nitro from them and potentially leaving them with negative nitro that they must remove by collecting more nitro. The user then recieves all of the stolen nitro, potentially with a multiplier, and is given a huge temporary boost to nitro usage represented by the nitro aura turning green from its normal blue. The initial purpose of this item was to encourage nitro stockpiling from the race leaders to avoid dropping into negative nitro which might be very hard to recover from, at the same time it provides a boost that can be dosified by the user (unlike zippers).
- New item: Mini-wish. Gives players in the first positions tons of options and spices up their play time while also not making these players tangibly more powerful as compared to before unless they strategize its usage heavily. It gives a choice between a weaker version of the cake, zipper and bubblegum powerups
- New item: Electro-shield. It gives a multiplication to the engine force, gives a slight top speed boost, does not shield from bubblegums on the floor, but otherwise acts as a perfect shield.
- Item behaviour change: Bubblegum. The bubblegum shield now doesn't stack infinitely when deployed on top of an existing bubblegum shield, instead it only adds half its duration. Crucially, it now pops when using any offensive items, making it a solely defensive item and relegating the electro-shield as its offensive cousin.
- Interaction change: deploying a swatter when a bubblegum shield is active now pops the bubblegum shield instead of simply erasing it.
- New feature: Impulse-based collision system. When two karts collide, the heavier one will make the lighter one yield, and they will both get a proportional impulse to one side, minimizing the actual time they spend in contact. The main benefit of this approach is it allows wheel bumping and "bumper cars" much more, as opposed to the purely physical approach of 1.0 that meant karts engaged in fierce battles would often interlock, lose their steering autonomy, and have a double crash into the wall. Needs some tuning or a rework though, as it's good but looks ugly.
- New feature: Boosts make the slowdown from going offtrack be reduced, allowing players to freestyle their own cuts. THIS WAS REMOVED FOR TME BECAUSE IT'S A TERRIBLE FEATURE
- New feature (stolen from a more popular game for no obvious reason): Purple skids. Not BAD I guess? But might be tuned in TME in the future.
- Feature modification: basketballs are now inescapable. I personally hate this, but it has its merit. In 1.0 the basketballs can be outran indefinitely in most tracks by a good enough player. Mostly changed back to the 1.0 behaviour in TME.
- Anti-glitch fix and new feature: Identified, designed and implemented by Nomagno. In SuperTuxKart 1.0, the fact that on-track zipper boosts occupy the same slot as the item zippers mean that you can't use item zippers tracks that have big, long-lasting ground zipper pad sections. This seemingly small issue has become a huge deal for most of the 1.0 lifecycle, specially with the proliferation of track ports from racing simulators such as STK's Italian, open-source older brother TORCS turned Speed Dreams. These tracks are mostly so big they need ground zippers to be any fun. The separation makes it so that on-track zippers are a distinct boost that is not overridden by item zippers, and viceversa. However, their effects are not cumulative. Instead, the best engine force of either active boost and the best top speed of either active boost will be separately applied at any given time, automatically giving the player the best combination while ensuring they can't reach absurd speeds that slightly break the physics simulation.
- Gradual braking: Suggested by Nomagno. Basically, now braking will be applied, even with a keyboard, as a separate entity from acceleration, and gradually at a maximum fixed rate. This drops braking points up to a dozen meters back in the tighter tracks, and consequently raises the skill cap a bit while. An as-of-yet unfixed issue (though severely mitigated by my auxiliary changes in TME, as I was the one who identified the issue in the first place) is the fact that it now becomes sometimes faster to take the grass/gravel/etc on the side of tracks than to brake for corners.
- New handicap system: handicaps don't change the feel of the karts, only their boosts and speeds. There are four handicap levels, 6%, 12%, 18% and 24%. There is no online UI support for anything other than the 6% handicap, though it's planned. The higher handicap levels make for a proper way for good players to have fun with more casual gamers, and it even has potential in tournament rulesets.