The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5308 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5308 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1474 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1474 errorHandler->error
/inc/functions.php 1429 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Forums
Reverse Tracks - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3)
+--- Forum: Cars & Tracks (https://www.vdrift.net/Forum/forumdisplay.php?fid=11)
+--- Thread: Reverse Tracks (/showthread.php?tid=531)

Pages: 1 2 3


Reverse Tracks - pwp71 - 02-21-2007

What do you think to drive in some circuits like dijon(very funny) pau, weekend and some
others on the contrary way?

So, we have a more circuits with few work (I hope).
We can insert in the track.txt file one attribute like reverse true/false
and below give new start position and start directions, etc.
Another solution is add another file like trackr.txt with reverse info.

Give me your feedback ( but before drive a little bit with reverse dijon Wink )

pwp71


- joevenzon - 02-22-2007

Sounds good to me. Other games tend to do this a lot.


- thelusiv - 02-22-2007

This would be pretty simple to code up. If someone takes the time with the tracks, and creates backwards starting points and a backwards track sequence for them, someone will code it. However to really support such a feature, sort of like any of our track features, it must be retro-fitted onto our old tracks.

So is someone willing to go through and make reversed versions of all our tracks? If so, I'll gladly throw a "Reverse track" option on the start game menus.

To make a track backwards, just open it in the editor as if it's a new import, then re-trace the track in reverse, and set new starting points. Save the file and then add it to VDrift SVN under the data/tracks/track_name/roads.reverse.trk. I think we'll also need a track.reverse.txt for each of these. Post here if you add some, and we'll make them work. Smile


- pwp71 - 02-22-2007

After I'll finish to update start positions, I should try to create reverse tracks.

Someone could create "Reverse track" option on the start game menus?

pwp71


- thelusiv - 02-22-2007

I will add the option, I'll just need some data to test it with. If I have time I could possibly get this done this weekend, I will copy one of the normal track files and simply name it as reversed, and test that way. Right now though I should really focus on getting the menus set up to allow editing the control assignments, which I'm finally making some progress on.


- joevenzon - 02-23-2007

I don't think you'd need to trace it backwards... just set the timing sectors up again backwards and also the starting positions to be backwards.


- rookie1 - 02-23-2007

The AI driver does rely on the patch sequence. So if you want to race against AI in reverse direction, we will need to reverse the patch sequence. Since the patch sequence is just a linked list, another way would be to change the code in track.cpp to create another linked list in reverse order.


- thelusiv - 02-23-2007

It shouldn't be too hard to make a function to reverse the linked list. If someone sets up a track with reversed timing sectors and starting positions, Joe or I could set up the track patch reversing code, and test it out.


- joevenzon - 02-23-2007

Now that I think about it, we should just be able to reverse the patches AND the timing sectors and be set. We could even flip the starting positions. It shouldn't be hard to do at all....


- joevenzon - 02-24-2007

Preliminary support for reversible patches in SVN r1559. Still not working: laps aren't being marked correctly. You tell the track class to make the track reversible with the new TRACK::Load overloaded function.

Also, I'm not sure if this is something that I broke or something that was already broken, but the "POSITION" display isn't working correctly.


- rookie1 - 02-25-2007

The lap counter increases when the car pass through timing sector 0. In the track reverse code, the timing sectors are also reversed. So the last timing sector in the original track becomes the new sector 0. This causes the lap counter to increase at the wrong place.

Car position depends on the relative distance from the starting line (timing sector 0) to the current patch. These are calculated during track loading, in BEZIER::Attach() and TRACK::Load(). I guess when the track is reversed, the relative distance is not recalculated. The position display become reversed as a result.


- joevenzon - 02-25-2007

Thanks for the info. I'll try to fix this the next chance I get.


- joevenzon - 02-25-2007

Everything seems to be working now except the position display, which is the opposite of what it should be. Any idea why this is? I've left the track reversal enabled for all tracks in SVN R1562 if you need to debug.


- rookie1 - 02-26-2007

I think we need one more change in BEZIER::Attach(), that is to reverse the sequence of the 4 corner points. This is because the car's relative distance from starting line is calculated as follows (you can look at Vamos_World::World::update_race_position() for the details),

car's distance from starting line = current patch's distance from starting line + car's distance from the beginning of current patch
Code:
|<------ a ----->|<---- b ---->|    
.................+--------------------------+
                 |                          |
                 |                          |
                 |-------------*            |
                 |                          |
.................+--------------------------+

a = current patch's distance from starting line
b = car's distance from the beginning of current patch
* is the car
The beginning of current patch is the straight line formed by points[3][0] and points[3][3] of the patch. In a reversed track, it should be the line formed by the other 2 corner points.

I hope the above makes sense.


- thelusiv - 02-27-2007

I added a "Reverse Track" toggle option to the Practice Game and Single Race menus, in SVN r1565. Tested it out, seems to work fine.

Trying this option on Ruudskogen (please note I only tried this once on one track) if I choose to reverse the track, I don't see the starting gate as I do when I race forwards. It seems perhaps the starting points need to be moved backwards (relative to the reverse-facing cars) about one track segment...would what you describe fix this, rookie1?