Tokyo 30 September 2004
THERE WILL COME A DAY
When one of my digital creatures will outrun me on race track, well no, wait, that day came yesterday. I don�ft really know how many programmers can say to have experienced that strange feeling, it does feel a bit like HAL taking over, and when you know, as I do, that that PC is not �gcheating�h, he�fs just driving �gyour�h car better than you do, that really makes things more scary.
Of course I have to clarify things before I go on, otherwise I will have to cut people�fs enthusiasm on the forums and shatter their dreams to have an AI to compete in nKpro. I am not saying this isn�ft going to happen, but it stays as a very low priority experiment that I do one day every once a while just because it is an amazing thing to work with.
Running a field of full physics cars (btw, with netKar�fs physics, I am sure you can run 300 Pole Position cars on today�fs hardware :-P ) it is not something our machines will be able to do soon.. so there�fs no need to rush into it, of course it does have its applications.. imagine a rally stages where you can actually see AI driver going on the SS before and after you, again, and that�fs the main point, with the same car you are driving.
And in its �gintelligence�h my AI is pretty much limited, it did beat me, but:
1) I am not the quickest driver in the world
2) It did that at Newbury, pretty much a �gdumb�h track of, brake, clip to the apex, exit as fast as you can and ready to the next corner. I mean, there are no �gtricky�h section in Newbury whatsoever.
But it did that with a minimal amount of information and until yesterday it was lapping around 1-2 seconds slower than me, while now is constantly some tenths ahead. To get there with the best my AI will have now to learn how to get to the apex as quickly as possible, everything else: braking and exiting under acceleration is pretty much done. It also has no knowledge or consideration for cars around, I mean, it is pretty basic, but, as I said, it doesn�ft cheat, I can run my car and do 2 laps, press the �gAI button�h to pass the controls to �git�h and see the AI pulling a new track record.. as I said: pretty scary, but in a good way.
TYRES TYRES TYRES
Math model for the tyres is getting more and more refined, driving it�fs such a pleasure and when you feel you are on the �gedge�h it really is something special. I am coming out with a series of interpolated relations between all the sets of data I have for different tyres, it is almost impossible to create a real relationship, I mean, size is nothing; you can have a 205/45/R17 of rubber X and a 205/45/R17 of rubber Y and they will behave differently.. but I am trying to work out all these relationships anyway.. as for aerodynamics, it doesn�ft have to be �gperfect�h it has to be believable, so if you�fre going for a bigger and lower ratio tyres you will get what you�fd expect: higher cornering force and more �gsnap�h plus another enormous list of other effect. This gives us the possibility to just dial in a size and model and have a reasonable tyre model to start with.
EDITORS AND TOOLS DO MAKE THE DIFFERENCE
Most of my time is spent on tools rather than on the real physics code, tools to develop and analyse what the car is doing. These tools are invaluable really, it let you look at the problem from different angles, and little �gbug�h and irregularities just come out. They were all virtually unseen before and each one of them, no point listing all of them, brings an improvement in the simulation; an improvement you feel under your hands as soon you hit the track. Spent so much time online with Aris on differentials this week, you see bugs, you start to see ghosts sometimes, but at the end, when the right tools are in place it is nice to know everything was already more or less correct and there was just �gthat�h little thing wrong.
NVIDIA AND ATI
While I had my lightmapped track running in netKar that pretty much covers me for shadows for the future I am still experimenting with shadow maps, they have so many potential advantages that I keep coming back to them. Shadow mapping for NVIDIA and ATI is 100% different, I wrote my original shadow mapping code one month ago while I was using an nVidia FX video card, and it just crashes on an ATI video card. Technically they approach the problem in a different way, on nVidia you render your shadow map to a special texture that acts like a depth buffer and has 24bit of depth, so you build the texture, create another surface to be to �gcolor render target�h and off you go; on ATI it is just the opposite, you create the texture to be your shadow map as colour render target using a floating point texture surface, and then you have to write your Z values into that. The pixel and vertex shaders for the 2 versions are quite different, the nVidia�fs one is very simple, it just output black to the colour and the depth is automatic. On ATI there�fs a bit more work involved since you have to compute the depth and write it in your �gcolour�h texture. The pixel and vertex shaders for the usage of the shadow map itself aren�ft that different tho.
TOKYO GAME SHOW
I�fve been there last Sunday, and I was able to have a look at what is happening on the console�fs side of the world. As far racing sims are concerned, Konami�fs Enthusia put me a big big smile on my face, it really feels good, it looks amazing and it could break the GT�fs domination on PS2. I couldn�ft test GT4, there was something like one hour queue to have a go, and I didn�ft want to join, from what I saw looking at other people playing the physics is very nice, but it is �gstill�h GT and the technique of cornering hitting everything around the track is pretty much still a �gwinner�h L.
Back to you next time
Stefano