Talk:GSoC Physics

Physics and Game Play Improvements

Using a corkscrew or loop-the-loop track allows artists to create much more interesting tracks. Unfortunately, this kind of track was not considered with the original game design. Some preliminary work has been done: in our current development version is it possible to change the gravity of a kart depending on its terrain, so karts can drive on the wall or ceiling. The 'next gen' chocolate track (atm with jungle screenshot) contains an example on where a kart can drive on the wall (turn left into a tunnel off the main road - node that this track is heavy work-in-progress, and contains unfinished sections and other problems). But many more features need to be added to make this useable in a game:

  • items must be made aware of the gravity changes as well:
    • The rotation of boxes and bananas must be adjusted so that they rotate around the gravity direction.
    • The behaviour of the powerups must take the changed gravity into account (e.g. bowling balls should follow the road; the exact behaviour of cakes needs to be refined, too).
  • the AI must be aware of the behaviour. This requires significant changes in the way the kart position is currently determined (basically using the projection of the kart position on a 2d map), and how the AI determines where to drive.

Those changes are significant, and it is expected that a significant number of classes need to be improved to handle this.

More physics improvements are of course possible:

  • Different kart physics could be implemented, e.g. some karts might turn better, have higher speed, higher mass, don't touch the ground (hovercraft, flying carpet), ...
    • This needs additional testing code to make sure the karts are reasonable balanced, so
    • Also the AI might need to be aware of different kart physics
    • Some GUI work is necessary (e.g. to visualise differences in karts when selecting them)
  • Support for real motor bikes (i.e. bikes that actually lean into a curve), perhaps add a wheelie feature.
  • Improve jumps and cannons (for instance, jumps are difficult because at higher difficulties you drive faster than at lower difficulties)
  • When falling from jumps, karts often lose a lot of speed upon colliding with the group, This could be improved

A proposal for a GSoC project related to the physics does not need to suggest implementing all ideas mentioned here. The most important aspect of a proposal is a realistic schedule.


Have a look at our driveline page (and the theoretical driveline model page). At this stage STK uses a simple projection of the kart position onto the XZ-plane (by dropping the Y coordinate) to determine where the kart is. This obviously will not work anymore when the 'up' direction can change anytime. A proper implementation of finding where the kart is will probably be the most difficult part of this proposal. Due to the larger number of classes that might need to be changed (including bullet) good OO-design skills and quick understanding of existing code would be rather important prerequisites for this task. Also maths and some physics skills are important.