August 2, 2014

Driving on walls? Yes please.

Hello everyone,

So this is my first blog post here, I should apologize for the long silence. For those who might have forgotten, my GSoC project was, simply put, allow karts (AI and player) to drive on walls and upside down. Now that the most of the AI is functionally capable of handling any kind of track that fancies your imagination, I think its now time to discuss some results.

The AI traversing a loop in Newton
Above you can see the AI skidding through a loop in a test track called Newton. (Ignore the flying kart in the middle, its some developer magic.) The AI still uses the old algorithm but now it does something extra. Imagine that the loop is made of a strip of yellow paper. Cut out the loop and flatten it on an imaginary table, and now try to navigate this flat loop using the old algorithm. Sounds easy right? That’s what the AI is doing, except its a little bit tricky to do in code ;) Once I got the steering right, the skidding “just worked”, which was nice.
Next we look at items. They are now auto-aligned depending on which section of the track they are placed at. These include bonus boxes, bananas, nitro etc.
An AI kart collecting a bonus box on a vertical section of the track
Powerups like bowling balls, cake, basketball and rubber band have also been fixed to work when being thrown from any orientation. Bowling balls will now follow the track instead of falling down. The cake and rubber band will now hit the target irrespective of what direction the opponent is going (assuming you are in range). The basketball has been fixed to bounce in the direction perpendicular to the track instead of the up-direction. It will now follow the track as you would expect.

The rescue animation was also required to be adjusted so that the kart is dropped in the correct place, with the correct orientation. If you are upside down when you drive off the track, then that is how you should be placed back. This turned out to be a bit tricky due to a bug between irrlicht and the physics engine but thanks to hiker’s expertise this was fixed. Along with this, the explosion animation is also fixed to be perpendicular to the track.

for the lulz
Most of the AI including items and other features had been previously designed with a horizontal track in mind. This lead to the AI being coupled with the coordinate system, ex. directly using the Y axis for many operations. Majority of the work has been done to decouple the coordinate system and AI.

All said and done, this project is not complete until we get some feedback from you, our loyal players. You may check out the source here , branch: walldriving. Build and run as usual and let us know what can be improved, and if you find a bug, even better :)


  1. Hi Nixt!
    I'm really looking forward to see how your improvements will inspire the track desigers.

    Have you tested how your changes alter the gameplay in arenas?

  2. A propos track designers. What do track designers have to consider if they would like to use your features? Have you communicated these changes to Csaba who is creating the track editor?

    1. Hi Tuxfan!

      I am also looking forward to see some interesting tracks in the near future :)

      About the arenas: There have been some modifications to the kart's suspension and solistice's work on different kart physics. These changes affect karts in all game modes. Apart from that, the gameplay in arenas is unaffected. There is however a Battle mode AI that has been made but it needs some more work ;)

      There is nothing special that the track designers have to consider to use the new feature. The AI is designed to handle any kind of track. However the driveline requirements are a little more strict now. This will be updated in the driveline wiki page.

  3. I don’t really get it.
    It seems like you removed gravitation, or at least tweaked it so that it follows drive line orientation.
    In this case, what is point of a looping if you can pass it at slow speed?

    1. Yes you are right that the gravity now follows the drive line orientation. I don't quite understand your question though, how can you pass it at slow speed?

    2. I think he asks if you will fall when your are stopped at the top of a looping, or not.

    3. Loop-the-loops have been possible for a long time, but no track ever used it (afaik, except for a physics test track). The intention of this project is to allow karts to drive on the wall or ceiling to allow more interesting track designs and effects. Some new tracks (e.g. codename 'chocolate') already use it in our development version.

  4. The dev version has a few tracks that use this driving on walls and I agree with MCMic that it feels kind of pointless. It would be much more fun to have a vertical loop that you have to drive really fast into and make sure you keep the speed throughout so that you don't fall on your head. This makes for cool visual effects - the whole world turns sideways as you drive on the wall - but that's it. You keep driving as usual, no extra thrill. But it will make a funky looking Escher track :)