Track Building - the 1500 Sector Limit(??)

Posted by foxtrot1985 
Track Building - the 1500 Sector Limit(??)
Date: May 19, 2013 07:32PM
Posted by: foxtrot1985
Hi,

My current quest in building my home-town circuit has come up with a concern as I've just received a pop-up dialog saying I have reached sector 1,500.

Although it appears I can still build beyond this on GP4Builder, does this mean the GP4 won't allow me to upload it because it believes the circuit is 'too long'??
It means, that GP4.exe will crash when you try to load the track ;-).
Re: Track Building - the 1500 Sector Limit(??)
Date: May 19, 2013 07:39PM
Posted by: foxtrot1985
Oh FUDGE! And I reckon I was about 3/4miles away from completing it ;-(.

Ahh well, thanks anyway - will have to do a TomTom and find an alternative route ;-)
Re: Track Building - the 1500 Sector Limit(??)
Date: May 19, 2013 08:08PM
Posted by: addie
foxtrot1985 Wrote:
-------------------------------------------------------
> Oh FUDGE! And I reckon I was about 3/4miles away
> from completing it ;-(.
>
> Ahh well, thanks anyway - will have to do a TomTom
> and find an alternative route ;-)

no wait, the limit is not 1500 :) its "near", but its not there, so maybe you luck out ...

there exists a precice figure of how many sectors are loadable, and it means track+pitlane. so if, by chance, you plan to have a short pitlane your chances are even better. I dont recall the very figures at the moment, but I'll post again ...

- - - - - - - - - - - -
please no PMs; but you're welcome at: [addie3 at waa63 dot ch] and [www.waa63.ch]
Re: Track Building - the 1500 Sector Limit(??)
Date: May 19, 2013 08:34PM
Posted by: Lo2k
Yep, I also heard about a global track+pitlane sector count limit. So if the pitlane is short, track could be longer. But I never heard about someone checking this is for real.
You can go ahead. With a bit of luck, it will fit.

PS : by 3/4 miles, you mean between 3 and 4 miles (then you might stop, it most propbably won't fit) or 0.75 miles (there are chances it fits).





Edited 2 time(s). Last edit at 05/19/2013 08:36PM by Lo2k.
Re: Track Building - the 1500 Sector Limit(??)
Date: May 19, 2013 08:49PM
Posted by: foxtrot1985
Thanks all,

I say 3/4mile as in 0.75 miles. I may be lucky as I believe the pit lane may be shorter than first thought. Will have a bash...
Re: Track Building - the 1500 Sector Limit(??)
Date: May 20, 2013 11:39AM
Posted by: addie
I hit the limit at 1650 sectors, track 1494, pit lane 156. this track loaded, and I successfully made a pit stop and joined the race again.
at 1651-1653 gp4 froze when loading the track "at the end of the bar", at 1654 and more (I also checked 1658) it crashed to desktop before the weather screen appeared (when loading the .dat that is. same as gp2.exe and gp3.exe were used to do also).

though I'm not 100% sure whether it is still the sum of track plus pit lane, that hits the limit, or whether there were individual limits also. in gp2 it definitely was the sum, so I tend to believe thats still the case.

so, as minimum pit lane length will be at about 50, maybe a few sectors below that, maximum track length may be at about 1600, ca 7.8km.

- - - - - - - - - - - -
please no PMs; but you're welcome at: [addie3 at waa63 dot ch] and [www.waa63.ch]



Edited 1 time(s). Last edit at 05/20/2013 11:44AM by addie.
That reminds me on the lap-limit:

Long time we thought the lap-limit would be 100, until some guys found out that it is 128 laps in real.
Keyword: 'power of two'.
--> So, could it be, that the real sector limit is 2048 sectors in any way? Just as a thought-provoking impulse ;-).
Re: Track Building - the 1500 Sector Limit(??)
Date: May 20, 2013 11:58AM
Posted by: addie
klausfeldmann Wrote:
-------------------------------------------------------
> That reminds me on the lap-limit:
>
> Long time we thought the lap-limit would be 100,
> until some guys found out that it is 128 laps in
> real.
> Keyword: 'power of two'.
> --> So, could it be, that the real sector limit is 2048 sectors in any way?


I'm afraid it isnt. as mentioned, I hit it hard at 1654, and the last good one was 1650. you are right, some of the limits are "power of two", but others are arbitrary. for example I recall with the original grandprix.exe you had to have (at least) exactly 600000 bytes of free memory in your DOS-installation, else it didnt load. 599999 was not good enough. and it was hard coded in the exe, SDI found the figure IIRC.

beside the length limit, also the "world" is limited to some 2.5 x 2.5 km.
same to the height. as I found lately, the latter is at about z= +/- 160m, another arbitrary one. if you go beyond that strange things happen

- - - - - - - - - - - -
please no PMs; but you're welcome at: [addie3 at waa63 dot ch] and [www.waa63.ch]
Re: Track Building - the 1500 Sector Limit(??)
Date: May 20, 2013 05:07PM
Posted by: SDI
.dat file max size = 200000.
max number of segments = 1631 (excluding pit lane).

Maybe I should implement the assertions for GP4. This helped when hitting limits with GP3 track editing.

René Smit, Independent Software Developer.
Download my GPx tools here.
Re: Track Building - the 1500 Sector Limit(??)
Date: May 20, 2013 05:25PM
Posted by: Prblanco
The height of about 160 m actually makes sense. The GP4 "unit" for length is 16 feet = 4.8768 m.

160 m are a little more than 32 "GP4 units". 64 if we count from -160 m. The same for the 2.5 km dat limit, 512 "GP4 units". Both powers of two :)

So we can say that the exact .dat limits are 8192 feet (length and width) and 1024 feet (height). Which, in meters, are 2496.9 and 312.1.


My unfinished tracks: [www.grandprixgames.org]
Send bug reports and track editing questions to f1virtualblog@gmail.com
Re: Track Building - the 1500 Sector Limit(??)
Date: May 22, 2013 06:51PM
Posted by: addie
Prblanco Wrote:
-------------------------------------------------------
> The height of about 160 m actually makes sense.
> The GP4 "unit" for length is 16 feet = 4.8768 m.
>
> 160 m are a little more than 32 "GP4 units". 64 if
> we count from -160 m. The same for the 2.5 km dat
> limit, 512 "GP4 units". Both powers of two :)
>
> So we can say that the exact .dat limits are 8192
> feet (length and width) and 1024 feet (height).
> Which, in meters, are 2496.9 and 312.1.

I'd say, you are on the safe side with those figures. on the other hand they are based on "the 16 feet", and those were just my best guess back early 1998 with gp2, when it wasnt clear, and speculation was going on. I took the original tracks, assumed norman surplus did a proper job, and made some calculations. then I assumed geoff crammond is a practical guy, so I searched for some "sense" in my figures. "16 feet" was the closest british measure I found, close enough for me, so I postulated it, and nobody seemed to disagree so far. (and its "power of two" also :)
I for myself am still convinced and happy with it. but its just a guess anyway. geoff crammond only could tell.

and as for the XY-space of the .dat, looking at original hockenheim, most of all "nordkurve" (the first corner after s/f) indicates there is some room left ...

- - - - - - - - - - - -
please no PMs; but you're welcome at: [addie3 at waa63 dot ch] and [www.waa63.ch]
Re: Track Building - the 1500 Sector Limit(??)
Date: May 22, 2013 10:24PM
Posted by: foxtrot1985
Hmmm... Quite a thought-provoking notion, however maybe not a favourable one. ;-)

My track has crossed over the S/F line at 1676 Sectors (assuming you don't need any extra Sectors at that point) excluding pit-lane (currently set at 161 sectors (Melbourne template) however that number could be halved with the required length of the pit lane). False hope maybe.

Another interesting thought that has dawned on me just now is that the track build is currently flat without elevations or profiling as yet - that's my next task. Am I right to assume that you may need extra sectors to take that into consideration. Height is not a problem I don't think - I think I measured that the rise in sea-level from the lowest point to the peak is around 90 metres.
Re: Track Building - the 1500 Sector Limit(??)
Date: May 23, 2013 06:54AM
Posted by: addie
foxtrot1985 Wrote:
-------------------------------------------------------
> Hmmm... Quite a thought-provoking notion, however
> maybe not a favourable one. ;-)
>
> My track has crossed over the S/F line at 1676
> Sectors (assuming you don't need any extra Sectors
> at that point) excluding pit-lane (currently set
> at 161 sectors (Melbourne template) however that
> number could be halved with the required length of
> the pit lane). False hope maybe.

please dont beat me, but I'm afraid 1833 sectors definitely won't work (crash to desktop before the weather screen appears). as mentioned, 1650 is the limit, the length-limit.




> Another interesting thought that has dawned on me
> just now is that the track build is currently flat
> without elevations or profiling as yet - that's my
> next task. Am I right to assume that you may need
> extra sectors to take that into consideration.
> Height is not a problem I don't think - I think I
> measured that the rise in sea-level from the
> lowest point to the peak is around 90 metres.

no problem here (strange enough), gp4 (as did the earlier versions also) performs no trigonometry here as far as I saw. the length limit concerns the number of sectors, 1650, and we accounted so far just the x-projection of them, so seems gp4 to do. please if anybody has different experience (preferably proven by example), please post.


as for the altitude, as mentioned, the range is about 320m, centered at z=0, so you have to stay within -160 and +160, which means you may have to think about at which Z to start, depending on the altitude of the s/f-line.

btw we are talking about the .dat (only) here. .gp4, the gfx-part may have other limits. say if you have a highriser-building next to the s/f line, the latter at z=0, the building can be much higher than 160m, no problem. but if you have your sectors in the .dat at a higher z than 160, as soon as you go through z=160 (maybe not exactly 160, but somewhere near that) all of a sudden you drive at -160m.
though contrary to gp2/3 the transition is smooth now, the gfx just clips, I dont recall the details. track side cams, cc-cars and player-car react all a bit different. in gp2/3 you did it in a very spectacular way :) ("grandmother of all ramps";)

- - - - - - - - - - - -
please no PMs; but you're welcome at: [addie3 at waa63 dot ch] and [www.waa63.ch]
Re: Track Building - the 1500 Sector Limit(??)
Date: May 23, 2013 09:07PM
Posted by: foxtrot1985
no probs - I think I have a Plan B in mind ;)
Re: Track Building - the 1500 Sector Limit(??)
Date: May 24, 2013 01:22PM
Posted by: gareth
Out of interest, is there a minimum track length?
Re: Track Building - the 1500 Sector Limit(??)
Date: May 24, 2013 01:43PM
Posted by: SDI
I would be interested in a minimal track, an oval of minimum length. This would help me a lot with testing, as it saves me a lot of time driving test laps.

René Smit, Independent Software Developer.
Download my GPx tools here.
Re: Track Building - the 1500 Sector Limit(??)
Date: May 24, 2013 02:00PM
Posted by: SDI
By the way, 1650 segments (I call the 16 feet units segments, as sectors can span multiple segments) is the size of a buffer in memory to contain the segments (both track and pit segments).

There's also a track zone buffer, with 1 zone spanning 32 segments. These exclude the pit segments. I found these while searching for the yellow flag zones. The size of the buffer is 50 track zones. There's a bug in the range check while loading the track, where it asserts that (#segments / 32) <= 50. It's an integer division so 1631 / 32 = 50 (round down). The last 31 segments are then beyond the last zone. This still works, but any zone related stuff won't work in that area (e.g. can't become a yellow flag zone).

There's also the limit of the .dat file itself, which is 200000 bytes.

René Smit, Independent Software Developer.
Download my GPx tools here.
Re: Track Building - the 1500 Sector Limit(??)
Date: May 24, 2013 02:36PM
Posted by: Lo2k
Very interesting... I will surely update GP4Builder to take in account these new rules...

BTW, just by curiosity SDI, I assume it can't be done due to some relationship with other routines but I ask anyhow : could you ever increase this memory buffer size and if so would it be sufficient for the game to handle more segments per track ?





Edited 1 time(s). Last edit at 05/24/2013 02:37PM by Lo2k.
Re: Track Building - the 1500 Sector Limit(??)
Date: May 24, 2013 03:25PM
Posted by: Atticus.
If his answer would be, in some miraculous way, yes, I can imagine all GPG trackmakers joining the cause for a mammoth Nordschleife project immediately. :-)
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Supported by: Atlassian Experts Berlin | Forum Rules | Policy