Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Track Map
03-14-2007, 12:31 PM,
#1
Track Map
I've created a track map displayed at the top right corner during a race. A screenshot is in the gallery (http://vdrift.net/Gallery/media.php?f=0&...4122331399). 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?
Reply
03-14-2007, 05:22 PM,
#2
 
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. However...next week is my Spring Break from school, so I'll have much more time to work on VDrift then.
Reply
03-15-2007, 08:44 AM,
#3
 
The dots representing cars do follow the track properly. Currently the map is static. It does not rotate.
Reply
03-15-2007, 09:20 PM,
#4
 
I think this should wait until after the impending release.

How and when is the map generated?
Reply
03-16-2007, 08:47 AM,
#5
 
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.
Reply
03-16-2007, 09:34 AM,
#6
 
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).
Reply
03-16-2007, 09:49 AM,
#7
 
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.
Reply
03-16-2007, 09:52 AM,
#8
 
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
Reply
03-16-2007, 10:49 AM,
#9
 
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.
Reply
03-16-2007, 11:33 AM,
#10
 
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.
Reply
03-16-2007, 11:54 AM,
#11
 
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.
Reply
03-16-2007, 12:26 PM,
#12
 
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.
Reply
03-19-2007, 10:52 PM,
#13
 
Work for me on the Mac
Reply
03-21-2007, 04:50 PM,
#14
 
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...
Reply
03-21-2007, 06:40 PM,
#15
 
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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)