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 https://github.com/lurk26/stk-code , branch: walldriving. Build and run as usual and let us know what can be improved, and if you find a bug, even better :)

July 20, 2014

Kart Properties and Replay System

Hello everyone,

Mid-term has passed a few weeks ago, and I'm happy to announce that my work on the unique kart properties is done! The work I did on this is merged in the master of supertuxkart/stk-code, so feel free to test it out, and give some feedback on it!

What changed exactly? I created three different kart groups (light karts, medium karts, heavy karts) that are close to being balanced. Almost all properties are changed but the most influential ones are Power, Speed and Weight. Since users are no computers, they make different decisions, and they can determine if a type of kart feels "real". That's why I invite you to test some karts, and to give feedback on those karts.
Currently, AI prefers the medium karts (win 75% of the races), whereas it's clear that the light karts are by far the best karts for Player Controlling. This needs a lot of play testing to perfect this.
The other thing that changed is the GUI of the kart selection screen (I elaborated more on this subject in a previous blog post). We've read your feedback, and we agree that this screen is still a work in progress (cfr. skill labels only at first kart's skills). This is a short overview of what has been changed, stay tuned for more changes later on!

How can I test those changes? Most of the information on how to change values, can be found on the wiki page. As I said, there are 3 kart types (4 if you count the default values) existent in STK at the moment. What I would like to hear from you is if these types feel natural to race with, and if not, what needs to be changed. If you feel like it, you can also change those values yourself, test the new values to try and make it more realistic, and report your findings back to me. Other remarks on the kart selection screen is also always welcome!

For the replay system, most of the work is already done. When you check my branch (solistice/stk-code, v2replay branch), you can see the following GUI work supporting the ghost race game mode.
Game mode selection















As you can see, the icon used currently is the same as the standard game mode, feel free to try and work out an icon for us!
Selecting the ghost race game mode will bring you to the Ghost Race Screen

Ghost Race Screen

 Here you will see an overview of all saved races, with the track name, laps, difficulty and finish time (OnlineUserID and other elements will be added, when online high scores support is added!) After selecting a given race, the final replay dialog will pop up, where you can either Start the replay, Delete the replay, or go back to the previous screen.

Replay Dialog














Keep in mind that all of the work is still Work In Progress, and that all of these screens/dialogs can change. What is yet to be changed, is the information in the Replay Dialog, and the way replays are saved. Currently, all races are saved by default, but we might add a button in the End Game Screen where you can select wether you want to save the replay, and add a description to it.

The biggest changes needed in the ghost race itself, is to give the Ghost Kart an own shader (which makes it look more "ghostly"), fix the hovering karts, and make the karts go more smoothly.

As always, stay tuned for more updates!

July 3, 2014

First sign of life



I wrote this blog post to share the good news: I just managed to play on a “track” I created with the editor!

The game uses only a single texture on the terrain currently.

The exporter is in a very early stage of development. It can create the files for the terrain and driveline. I had to write other required files myself, but it was nice to see that STK can read my “track”. The driveline worked too: the AI could follow it without a problem.

Nice skidding, but seconds later i flew away

We have a few other changes as well: the camera used for editing is now orthogonal, and we have a nice indicator kart, which moves and rotates with the camera, showing us the size of a kart from the game. Every change on the track is reversible now: doesn’t matter what went wrong, undo button will work!
I just realized how huge our animals are.