Sunday, October 18, 2009

Scrolling leaderboard fixed

Jean Philippe wanted to include the scrolling leaderboard in the first release of Speed Dreams, so I've revisited the (obviously buggy) code.
I've simplified it quite a bit, every time the string is scrolled out of the screen it is regenerated on the basis of the last lap's results. It has no obscure logic anymore (for me at least).
I also made it generate 3-letter abbreviatons of the driver names, so the string to scroll would not be too long. This generation works on the idea of finding the first non-matching character in the driver names, so if there are 2 totally identically named drivers it cannot do any magic at all. I plan to introduce a new attribute to drivers (in the XML file) where we can clearly tell SD what abbrev to use, so one driver will be shown by that name each and every time, like RAI is always Raikonnen in F1. But I think that would come only after the release.
You can see the changes in SVN rev 1511, 1512, 1526, 1597, 1602 and 1603 (with some clean-up work included, too).

Wednesday, October 14, 2009

TORCS Championships 2009 - Alpine-1

Alpine 1 is a fine track, I was happy to see it on the race list of the TORCS championships. It has 3 quite different sections and so this is what makes it hard to setup a robot perfectly for this track. One must decide if he prefers the twisty uphill section, the curvy but fast downhill midsection or the last, sweeping, fast downhill one. The hairpins uphill provide some ground for overtaking while it is much harder to do in the downhill parts as speed difference is usually not big enough.
I wanted my robots to do the uphill section perfect and get rid of their sliding technique in the turns, so I've chosen big-degree spoilers and accepted the slower top speed on the downhill section. This proved quite OK as they were not overtaken any time in action, they always managed to make up some advantage uphill that opponents could not gain back downhill. The only time they lost position was when refuelling so the opponent behind could do a faster lap and gain 1 second before his own refuel. Just like in real-world racing, wow :)
The race itself started fine, but one of the Wolverines got lost in the last hairpin in the first lap, and while it did not cause big conflicts on that lap, the next lap saw real destruction derby - Wolverine 1 has wandered backwards(!) to the previous hairpin and met the field there.
Half of the field got stuck there while Dummies, Lobos, a JDI, both the Kilos and the Dots were lucky enough to escape \o/ The Berniew team lost both his cars in that corner and it made a top 10 roster much of my taste :)
The Dummies grabbed 1st & 2nd and didn't quite let go of it for the rest of the race. The Lobos were matching the Dummies' speed but after some unlucky overlapping one of them received some damage and so they couldn't use slipstreaming any more.
The race went on quite uneventful for my drivers, driving in pos #6-9. At around lap 45 or so EJr09 John stopped in the last hairpin uphill and spent some laps parking there until removed from the track - I don't really know what was wrong, he tried to escape the corner backwards, straight into the barrier. Most of the cars could handle it but some crashed a bit into him or produced crazy sliding turns.
From lap 35 Wolverine 2 began to slowly creep up the ladder, overtaking the Dots with clever refuel tactics and in lap 71 he even overtook Kilo1 while it was in the pits.
So after 79 laps (more than 2 1/2 hours) Dummies claimed the victory and both Team Alba and Team Dots had the best result so far during the season, finishing at position 6, 8, 9 and 10. I know the initial crash must have been a reason for this result but I am still very happy :) Oh yes, and I did not forget to send the results this time...
PS: Must tell that EJs act very nice letting overlapping cars get by, while I couldn't see that gallantry from many drivers...
PS2: Sadly enough only Daniel's race results seem to match my own, it seems other players had quite different a race then we two. So the sum-up of the results sent can be found here.

Friday, October 2, 2009

Go Andrew, go!

Andrew has decided to publish a step-by-step guide to produce pretty tracks for TORCS/Speed Dreams. A nice move and I can only hope I will be able to understand most of it :)
Anyway, here's the link (and I've put it on the left, in the 'Related Blogs' section, too).