Friday, October 29, 2010

Ramblings - 2010/43

Remember last time I wrote that I can run Speed Dreams again with decent FPS? Well, that seems to get worse now, the driver fails quite often and SD exits then. Another Linux bug, got to check the reports :(

Yet I've managed to develop the robot some more. Now it can handle skill settings, so you can set it up to be hmmm 'less than perfect'. The setting affects the braking (it starts breaking for a turn earlier), accelerating (it accelerates slower) and the width of the track is uses, so it isn't so brave using the full width of the track and sometimes even more, remains on the 'safe side' of driving. Whether this skilling is consistent or not, ie when skill is lower by 10% the lap times get worse also by 10% is subject to further testing.
Now I am in the process of setting up the LS-GT1 carset for the robot, the first car (the Archer R9s) is kinda ready with two fictional drivers. Check the process details here.
In the meanwhile I am trying to adapt the coding style of the whole robot codebase to match that of Google's advised C++ coding style. While in some moments it seems to be too narrow-minded pedantric there is quite some thought in it and in the end it may help improve code quality. One of the changes was to use full path in includes, #include "src/drivers/kilo2008/pit.h" instead of #include "pit.h". Kristof reported it caused problems when building the code but I think it is rightful to be sure the compiler uses the correct header files in situation like ours when there are several robots in the source tree with a pit header. Later Kristof said it only caused problems when using a separate build directory so not in normal cases. Another suggestion was to use "using ::std::string;" instead of "using namespace std;" so not to pollute the global namespace, something I've never ever thought of but can see the reason behind. is a great tool helping this process (nah in reality is a nasty little !*@#**^%& but we love it, right?)

Track-wise I am fighting a pitlane issue of too wide a pit lane and matching the correct texture for it. Just look at sat pictures of the St. Petersburg GP and you'll see my problem. Oh damn, I've so many track ideas... and Knockhill is next on the door.

The other day I've ticked off a ticket about incorrect number of laps displayed in the board1 area that was caused by such a trivial error I didn't notice it for an hour or so... passing the address of a char array to a function, then checking it's size is snprintf, the size if not the array size but the size of the pointer hahaha (4 vs 255). Trivial but painful :)

Haruna has shot a nice video of the current state of Speed Dreams, it is on Youtube, check it out:

That's all that comes to my mind today, Halloweeeen is right here \o/

Friday, October 15, 2010

Ramblings - 2010/41

Whoa it has been quite some time since the last post... Long story short: I lacked computing power to run Speed Dreams in an enjoyable quality, could only get 4-5 fps max! on my laptop, detailed here. Now I've updated it to the latest Ubuntu version and using the community-driven radeon driver it is able to produce 25-30 fps in a race so I can enjoy SD again. Wohoo!

Speed Dreams is nearing a 2.0 state slowly, and I can tell you the wow! factor will be high once you try it. Many a things has changed since 1.4 and you can enjoy using it very much. There are new tracks, new cars, a lot of sim engine changes, user-friendly menus etc etc.
My code additions are not too many yet but still I've managed to display the pitting driver differently on the leaderboard and resolve some track name and info issues when loading a track.

I've dusted off my kilo2008 robot and started adapting it to SD. You can follow its evolution here, or on a dedicated wiki page in the SD Trac. It is now able to drive along any track quite safely following this logic: it measures how long a track is and how many degrees of turns are on the track. From these data it computes something we can call like 'curviosity', ie: curves vs length. Then it decides which setup to use for the track - slow, default or fast. Of course one can create track-specific setups, if anything like that exists in the appropriate directories then the robot will use that instead of the above procedure.
I've also made it able to drive 20 cars the same time (some code stolen from Andrew...). Now I'm trying to squeeze in some code to handle skilling - so you can set one driver better than the other, or globally the user can select how strong (skilled) robot opponents he/she wants to play against.

Tracks - the same state where I've left them. But that's going to change soon.

Too bad the TRB Champs this year was no-go, cancelled.