Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Track Map
03-14-2007, 12:31 PM,
Track Map
I've created a track map displayed at the top right corner during a race. A screenshot is in the gallery ( No menu option to turn on/off the map display yet.

Should I commit the change now or after the release? How far are we from the release?
03-14-2007, 05:22 PM,
That looks really cool! How well does it work? Do the dots follow the track properly and does the track rotate with the car's heading?

Hold off on checking that in for a little bit. I'm trying to work out some problems with building the autopackage, we have a Win32 crash bug, and some other stuff to get working right before the release is possible. It's really close though and I don't want to add any new features or we'll feel they have to be finished up more before they're released too...

Also this week I've been really busy with school and putting together a new computer. I'm finishing up some projects now but I'm not sure if I'll get the release out by the weekend. If I don't that means it will have to wait until next week, because I'm going out of town from Friday night until Sunday night. week is my Spring Break from school, so I'll have much more time to work on VDrift then.
03-15-2007, 08:44 AM,
The dots representing cars do follow the track properly. Currently the map is static. It does not rotate.
03-15-2007, 09:20 PM,
I think this should wait until after the impending release.

How and when is the map generated?
03-16-2007, 08:47 AM,
It's created after the track is being loaded. Basically the track map is first drawn into a SDL surface. Then this surface is loaded into a texture and displayed on screen. I have modified the texture classes and texture loading function in utility class to be able to load a texture from a SDL surface.
03-16-2007, 09:34 AM,
If it is reliable / stable (how many tracks have you tested it on?) then please include it in the next release. It's just one of those really-nice-to-have features.

Otherwise it'll be months before it is in the wild (i.e. the VDrift release after this one).
03-16-2007, 09:49 AM,
I've in fact tested on all tracks. There doesn't seem to be any problem. However I agree with thelusiv and Joe it's not a good idea to add in features at the last minute.

Probably what we can do is shorten the release cycle for the next release after this one.
03-16-2007, 09:52 AM,
Actually that sounds pretty good. I will include it in the release if 1) it works on all the tracks we have right now and 2) there is an option in the Display menu to turn it off if people want to (to speed things up etc.). I figured it was just a static map and we'd have to generate a different texture by hand for each track, but since that's not the case it could be included. If you can get those 2 things above confirmed rookie1, go ahead and check it in, and I'll include it.

edit: I posted too quickly, looks like you've already confirmed #1, that's great Smile I agree the release cycle should be shorter. So far it could be described as "a few weeks to slightly less than six months". What's so bad about that? Wink
03-16-2007, 10:49 AM,
I've committed the changes in r1620. If possible, someone please test it on windows and mac. I've only tested on linux.

I've added trackmap.h and trackmap.cpp. Scons script has been modified to inclue trackmap.cpp. Windows and osx project file would need to do the same.

btw, the green dot represents player car. red dots represent opponent cars.
03-16-2007, 11:33 AM,
Works for me in linux. The code looks good, you're using a power of 2 surface size, and it should be robust enough for any track size or shape. Good work! I've made one small optimization, which is to delete the SDL surface after the texture is made. Checked in R1621.
03-16-2007, 11:54 AM,
Actually the SDL surface is intentionally held instead of deleted straight away. This is so that the track map can be reloaded in case TEXTURES::ReloadAll() is being called. I've modified TEXTURE::Load() to load from SDL surface if the pointer is not NULL. If the surface is deleted, reload will fail since the trackmap is not stored in any file.
03-16-2007, 12:26 PM,
Ah, crap, you're right. Really, the trackmap surface should be recreated and regenerated on a reload... but the way you have it set up, that wouldn't be quick to implement, so I'll set it back to how you had it... R1624.
03-19-2007, 10:52 PM,
Work for me on the Mac
03-21-2007, 04:50 PM,
Today I finally tested the track map (been too busy with packaging) and it doesn't work...I see the map, and the dots, but they don't move...I'm playing with the minimal package I built with SVN r1626 (2007-03-20 package I posted in another thread). This could be related to compiling with apg++ which is why I mention that I'm using the package and not just a compiled version, it's also in release mode which has optimizations...
03-21-2007, 06:40 PM,
Scratch that. :roll: I needed to clean my autopackage temporary build directory. Turns out that while it saves a lot of time to comment out "scons -c install" from the BuildUnprepare section of the apspec file, it makes things somewhat error-prone...

Forum Jump:

Users browsing this thread: 1 Guest(s)