OBLIGE Community

All Boards => General Discussion => Topic started by: andrewj on July 14, 2014, 11:33:51 PM

Title: RandTrack : random race-track generator
Post by: andrewj on July 14, 2014, 11:33:51 PM
RandTrack is a program which generates random racing tracks for the game The Need For Speed 1 (NFS1), both the original game and the Special Edition.

Web page : http://randtrack.sf.net/

(Rest of this post is the original post, where I was exploring different ways of generating tracks....)




This is not OBLIGE related, but I have been playing around with randomly generating closed-circuit race tracks (just their 2D layout).

The approach used in the following picture is very simple : there are a handful of pre-made shapes, each forms half of the track, and two shapes are randomly picked and connected together, and then sometimes skewed and/or rotated.

I had a few other ideas which did not seem workable:

(a) use the cellular automata logic (used in OBLIGE for caves) to generate a shape and then trace around the that shape to form the track.  Playing with this idea on paper lead to very "blobby" shapes which did not look much like race tracks.

(b) pick a random point and then randomly draw to a new point, etc etc, until we eventually get back to the start, and ensuring that angles are never to sharp or the track never gets too close to itself.  Kinda like how a human would doodle a race track.  This approach would require heaps of back-tracking (restarting) and hence could take a very long time to produce a usable track.

----------

An approach which should be feasable and produce truly random tracks is this: start with a predetermined shape (e.g. circle, but have several) which consists of number of short line segments, maybe 100.  Then "iterate" to produce a new track by deformation, moving each vertex by a small random amount, while maintaining angle limits and ensuring vertices don't get too close to the track.  Keep iterating for so long, e.g. 500 times.  Would probably need to test the result is OK (e.g. not returned to a boring circle).  You could also create some features at the beginning (straights, chicanes, hairpins) and maintain those features during the iteration process.
Title: Re: Random race-track generation
Post by: Glaice on July 15, 2014, 07:25:50 AM
Looks like an interesting change of pace instead of being focused on Oblige the entire time :)
Title: Re: Random race-track generation
Post by: De-M-oN on July 15, 2014, 02:39:45 PM
(http://www.letsplayforum.de/wcf/images/smilies/love.png)

I've sent you mailanswer btw ;)

For NFS1: If you got it working - Now you only need to add support for slopes and twisted turns. So much more it isnt anymore with NFS. You dont need to consider ai speeds since there is no possibility to edit that so far (I think it is hardcoded) and you dont need to consider lighting (NFS1 has no lighting), slope steepness doesnt matter as well for physics - car can go up even a straight up 90° angle street in front of you rofl. So basically its really the track shape alone. Would be awesome if you manage a way doing this :) The pictures look promising so far :)

So yes - look into the game and you'll see its not that much you have to consider.

And there are not only circuits in NFS1, there are also segmented point a to point b tracks - means this type of tracks dont need to be a closed circuit. The program should offer which track you want to modify, since you cant add tracks to the game, just modify existing ones.

For NFS 4 high stakes there is more known about the formats and for it exists the T3ED editor which is further developed by an other person and allows even to modify ai speeds and such and you would need to consider physics (not too steep slopes which the car cant go up for example^^ steep slopes are cool, but must be considered that if its extremely uphill that the car can do that hill :D)
For this game would be awesome as well, but I dont know how much more work it would be for you to support nfs 4 too (but definitely would much more to consider). But thats only dreaming and brainstorming :P
(meh I edited this one so much now in the hope you dont understand me wrong. I know it is already enough work for you to get nfs1 in :) )

I'm totally happy already to see even this thread.

Thank you so much (http://www.letsplayforum.de/wcf/images/smilies/love.png)

PS: I want to drive the track shape of picture 3  ;D ;D

oh damn if you get this working - This would be so goddamn awesome (http://www.letsplayforum.de/wcf/images/smilies/love.png) (http://www.letsplayforum.de/wcf/images/smilies/love.png)

Quote
This approach would require heaps of back-tracking (restarting) and hence could take a very long time to produce a usable track.

Time doesnt matter. Even if it would take an hour to create one track wouldnt bother me. I mean that serious.
You do great work.
Title: Re: Random race-track generation
Post by: flyingdeath on July 16, 2014, 08:49:39 AM
First, sorry for lack of feedback on last version of oblige, but you gave me very little to complain about so... Will have feedback soon.


But this sounds like a cool project. First before I forget, TORCS is an open source racing "game" that was made, if I am correct, for "racing AI" competitions. The track layout files are very simple and can be edited in a text editor, though the actual track model is separate, and I know less about that, as there is a program for converting the track layout into a model. The advantage of this program is that the AI's can race custom tracks without any fiddling about, and are very tough to beat. It is however punishingly unforgiving to race even with an analogue joypad, but maybe take a look.

If you are making track for nfs1, then the layout does not have to be a circuit. The reason I bring this up is because I have an idea for how I might go about generating a track, but it will not produce a circuit.

First you need information about the acceleration of some benchmark vehicle. You also need a function that converts the current speed of the vehicle into a turning circle. Then you simulate the vehicle accelerating across an empty field, and draw the track to follow the vehicles path. When the program decides to put a bend in, it looks at vehicle turning circle, and if it's an easy corner, it will be less than the tuning circle, hard will be more, though the funnest corners will be very near to the vehicles turning circle (I reckon). If the corner is sharper than the turning circle of the car, the simulated cars speed is reduced to a value where its turning circle matches the steepness of the turn.
To really make this work there needs to be some calculation involving the width of the track, as even a sharp turn on a very wide track will be easy to tackle at high speed, unless the corner is very long. Also you would need something to stop the track overlapping. Also hills and road camber will have massive effects on the speed at which you can take a piece of track, and you must avoid putting corners after jumps!

The deformation idea sounds pretty cool, and you could try lots of different types of deformation, find an article on deformation, or types of symmetry, and go wild.

Also really abstract, recursive, fractal type things might be cool to play with. The dragon curve with a low (30-40 degrees) folding angle looks like a particularly tricky track, or maybe you fancy a lap around Gosper island.

You could also produce tracks by adding lots waves together with different amplitudes and wavelengths (and phase), converted into angles for the track to change by, or forming the waves into a ring, and make sure all the wavelengths are factors of the ring length. (This is basically additive synthesis)
Title: Re: Random race-track generation
Post by: De-M-oN on July 16, 2014, 05:26:50 PM
Quote
Also you would need something to stop the track overlapping

That is very important. Even NFS 4 High Stakes doesnt support overlapping.

Quote
and you must avoid putting corners after jumps!
No he doesnt have to. Just a lessened chance that this happens* - can be raised up probability if you choose in the program a higher difficulty (yes course difficulty as an option would be good. So if you choose "easy" for example you would get an easier/fast track. And a mixed up (or random whatever you want to call it) possibility.

*= Because you just would have to brake before the jump. No problem. Even some original tracks of nfs series have a corner behind a jump. Remember for example NFS 2's Mystic Peaks after the bridge - ok the corner is not the sharpest, but sharp enough having to brake before the jump if one of the faster cars. I dont remember at the moment a better example. But anyway - this isnt a problem, its just braking enough before the jump. It just shouldnt be the case for every jump, so a lessened probability for happening this is enough.

The AI has not much priority to me and should be even impossible for nfs1 to consider. No editor available to change them, so I assume they're pretty hardcoded. But doesnt matter me. A randomized track shape is totally enough to me.

I'm so happy that you try to do this. Thank you again so much :)
Title: Re: Random race-track generation
Post by: andrewj on July 17, 2014, 04:08:04 AM
Interesting thoughts flyingdeath, and please no need to apologize, this is only a hobby after all.

Oblige 6.10 did implemented your idea of moving some final battles of a map into an earlier (bigger) room, though it happens fairly rarely because the final room often has a locked door.

back on topic, I think my deformation idea is probably what I will end up using, since it is able to make open tracks too (just start with an unconnected shape), probably need more segments but also require less iterations.

Big disadvantage of deformation method is not supporting cross-overs easily.  Sounds like NFS does not support them anyway, but other games do.  Something I will not worry about yet.

For slopes along the track, I am planning to create a random heightfield (fractal mountain) and the road will be planted on top of it (or can be dug down a bit).  This also decides whether the sides of the track are high or low.

The twisting (camber?) of the track I'm not too sure about, will probably try having the heightfield provide a small portion but the main portion being the curvature of the track -- and here some of the car physics and expected speeds would come into play.
Title: Re: Random race-track generation
Post by: De-M-oN on July 17, 2014, 12:51:45 PM
Quote
Sounds like NFS does not support them anyway

The cause for this is fairly similar to doom. You have a 2D track shape - like doom its 2D level architecture as well has. Height differences are stored as coordinate position and value like doom with its info at sectors and value. overlapping the shape would lead to invisible wall or even you drive out of the track or at worst case the game crashes entirely.

For curcuit courses it is very important that the start and finish is closed accurate. If the finish line overlaps some pixel the start of the track it works if not too much - but chances are there that the game doesnt register the lap and stays at lap 1. But better would be if its pixel accurate closed - if possible - was not always that easy via the track editor to do. A program which generates the course instead of moving the shape via own hand will sure work better :D And even more important is, that there is no height difference between start and finish.

Quote
The twisting (camber?) of the track I'm not too sure about, will probably try having the heightfield provide a small portion but the main portion being the curvature of the track -- and here some of the car physics and expected speeds would come into play.

twisting means you lift up only one side of the track.

Here a screen of a twist to left direction:

http://abload.de/img/dosbox_2014_07_17_21_xbiek.png

If they're too steep you fall into the road and drive it straight again (hard to explain via text and english as a german :D ). This needs a steepness limit so that this doesnt happen.
Title: Re: Random race-track generation
Post by: leileilol on July 17, 2014, 07:47:56 PM
Seen the Z Kart project?

Could be another vaporware as far as all those past ambitious kart projects are concerned though
Title: Re: Random race-track generation
Post by: andrewj on July 18, 2014, 05:25:54 AM
Yeah I can see how the "twisted" road needs to curve from one side to the other (I was probably thinking more in planar terms).  But curving side to side should not be difficult to do.

I think the NFS engine might be able to handle a closed circuit which crossed itself -- to me looks the rendering is very much done "along the track" rather than in real 3D terms, and the cars and objects seem to be relative to the virtual road.  Might be interesting to try it and see if it works.

@lei: never heard of Z Kart, searching finds a guy who made his own electric car and a Dragon Ball game.
Title: Re: Random race-track generation
Post by: leileilol on July 18, 2014, 03:58:35 PM
this (http://forum.zdoom.org/viewtopic.php?f=3&t=46231) and this (http://forum.zdoom.org/viewtopic.php?f=19&t=46324)
Title: Re: Random race-track generation
Post by: andrewj on July 19, 2014, 02:32:51 AM
Heh ok, kart racing in ZDoom.
Title: Re: Random race-track generation
Post by: andrewj on July 23, 2014, 02:13:01 AM
Before I can generate the tracks, I need to fully understand the format of the tracks (the TRI files).

The nfsspecs.txt is very helpful, but it is incomplete, and lacks information about SE (Special Edition).

To help understand the track format, I am working on a program which can load the tracks and draw what the tracks look like, show where objects are, etc....

Very early screenshot, so far it can only draw the "virtual road".  Later I will make it show the objects (so I can figure out the correct scaling of the deltas), and after that will draw the "actual road" (what is rendered in game).  Also need to be able to load the FAM files which contain the textures and sprites, and ability to draw the road in 3D .  These things will take a lot of time!
Title: Re: Random race-track generation
Post by: De-M-oN on July 24, 2014, 05:42:20 AM
http://www.share-online.biz/dl/KB00V79NOVH

This file may help you.

This comes with the Track editor. Open it with a texteditor (notepad)

Info about NFS SE will be hard I think. But the converter I linked you in email should help out? So it could create tracks for NFS and the converter could convert it to NFSSE format.
But we would need to test if it does the conversion reliable.
_
ow even the objects? my request was only to have random generated track shapes. Even drawing the road in 3D? wow..
You do much more work than I requested. Thank you so much so far! :-* :) :)
Title: Re: Random race-track generation
Post by: andrewj on July 25, 2014, 05:09:35 AM
3D rendering is probably not needed after all, and TRACKED can show the textures and objects in a FAM file, so doing it myself is not really necessary.

Thanks for the NFSTEU.BAS file, looking at it briefly now, I don't think it has any extra information about the track format in it, but I will double check.

For my program, called RandTrack, it will create tracks for the Special Edition.  Maybe in the future I will make it support plain NFS1.

My first planned task is to generate closed tracks which replace the TR1, TR2 and TR3 tracks.  When that is working well (it may take a long time), then support other TR tracks, and after that support the AL,CL,CY tracks and open tracks.
Title: Re: Random race-track generation
Post by: andrewj on July 29, 2014, 05:26:54 AM
De-M-oN, could you please test the track in the attached zip below.

The track replaces TR2.TRI and is for the Special Edition. It is a very simple track, but it is a good start I think ;)
Title: Re: Random race-track generation
Post by: De-M-oN on July 29, 2014, 12:07:46 PM
The game does both loading screens and after it tries to render the game it crashes with a black screen and no input possible at all. total crash. Have to restart dosbox.
Title: Re: Random race-track generation
Post by: andrewj on July 30, 2014, 01:40:55 AM
That's disappointing :(

I will need to investigate to find the problem.
Title: Re: Random race-track generation
Post by: andrewj on July 30, 2014, 05:51:33 AM
This one should work.

Same track : TR2.TRI (Autumn Valley)
Title: Re: Random race-track generation
Post by: De-M-oN on July 30, 2014, 11:20:47 AM
works fine now :)

-> Timetrial: Works :)
-> Head-To-Head (1 opponent): Works (of course with wrong ai speeds though, but there is no way to edit this (no program or specs for this available) so far anyway and even if there would - I think it would be incredible difficult to make the ai decent by automatic system. So yeah - it was expected and I dont care.)
-> Single Race (7 opponents): same problem like with test_01. Again: I wouldnt care. AI speeds are wrong anyway.
So the most important mode: the time races - work. Awesome and big thanks so far.

Track works perfectly fine. No invisible walls, road has no bugs on roadsides, game registers perfectly fine the laps.

If I've edited a track with the tracked editor - it seemed not to update the new car starting positions and I slided out of the wall into the track and started basically on the roadside and not straight due to this xD

Seeing that your track doesnt have this bug and I start perfectly fine on the middle of the right road is a nice impressive surprise to see :)
Title: Re: Random race-track generation
Post by: andrewj on July 30, 2014, 10:14:28 PM
The starting position for the player car has been my biggest head-ache so far.  When it is wrong, the game will just lock up (not start).

I am certain that the position is not stored in the TRI files, and I don't think it is stored in the INFO files (like TR2INFO).

I am fairly sure that the game engine assumes the track always begins at coordinate (0 0 0) and always goes directly north for a while (e.g. 24 to 32 virtual nodes == 6 to 8 segments).  I have looked at all the tracks in my viewer program, and they all begin like that.

So if you edit the track and move it around, it can cause the game to lock-up because it cannot place the car on the track.

Also the player car always faces due north, which is why in my test track it seems to be facing a bit to the left, the track is a pure circle so at that point the track curves to the right.

For the lap times and number of laps, I am sure that information is not stored in the TRI and INFO files.  I cannot see any other files where it is stored, so it is probably hard-coded in the game EXE and hence cannot be changed.

My next step is to get some decent 2D track layouts working, and after that add some slopes and slanting (twisting) to the tracks.  I also need to create the User Interface.
Title: Re: Random race-track generation
Post by: andrewj on July 31, 2014, 07:26:02 PM
I noticed two NFS1 tracks which do not exist in the game's main menu : TR4.TRI and TR5.TRI

Should these tracks be generated?
Title: Re: Random race-track generation
Post by: De-M-oN on August 01, 2014, 11:55:29 AM
Quote
I am fairly sure that the game engine assumes the track always begins at coordinate (0 0 0) and always goes directly north for a while

hmm thats interesting. I hope this doesnt disturb the randomizing in some way ???

Quote
For the lap times and number of laps, I am sure that information is not stored in the TRI and INFO files.
right.
The lap times are stored in the config.dat file (so this file doesnt just store game settings, controls etc, it does store the lap times and speeds as well.)

Quote
I cannot see any other files where it is stored, so it is probably hard-coded in the game EXE and hence cannot be changed.

The number of laps is very sure hardcoded. For long tracks it lets you choose between 2,6,12 laps (default 6) and short tracks it is 4,8,16

But since Rusty Springs (TR1) is the one and only track which is considered a short track and with this the one and only track which allows more laps you can fairly sure assume the 2,6,12 cluster.
So - Since I can choose between 2,6, or 12 laps (at track description - press enter while you've the track selector active (or click with left mouse onto the picture of the track) ) I dont even care so much anyway. If I need/want more/less laps I can just choose more/less.

Quote
I noticed two NFS1 tracks which do not exist in the game's main menu : TR4.TRI and TR5.TRI

Should these tracks be generated?

TR4.tri is the track "Lost Vegas" and has to be unlocked first. You can unlock it by winning the tournament. I'm sorry that my game isnt unlocked at the moment. I couldn't find my old config.dat file at this point.
If you win the tournament twice you also have access to the rally versions of the tracks (other road texture and other more arcade physics)
Rusty Springs' Rally version is even a complete else track (or better said a modified rusty springs) It now has lots of slopes like a rally track.
-> And this track is the TR5.tri

Lost Vegas should be supported in any case. Its an awesome track.
TR5 has very very low priority to me though. I'm also not sure if its even necessary to support it. The tracks are new shapes anyway then. And rally mode physics work for every track. The only problem would be if you intend to drive rusty springs in rally mode the game will try to access tr5 instead of tr1. This could be solved by using for tr1 and tr5 the same file.
Or ..... an idea for tr5 could be that tr5 has an extra high probability for slopes? That could be an idea I think ;D
Title: Re: Random race-track generation
Post by: andrewj on August 01, 2014, 08:56:12 PM
Thanks for that info.

I like your idea of doing weird or special stuff on TR5.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 03, 2014, 06:25:51 AM
One thing I have been thinking about is exactly how to generate the tracks.  Obviously I cannot make this program do anything useful until that is decided.  But now I have a fairly clear concept how to make both open tracks and closed circuits using roughly the same method, as follows :

Basically, there will be a set of pre-made shapes, whose lengths will generally be quite short but long pieces will be possible too.  Then we concatenate a series of these shapes together to form the track,  while making sure the track never gets too close to itself or crosses itself.

For closed circuits, we pick pieces which are either straights or turning clockwise (though sometimes we make the whole track go anti-clockwise).  When the track is long enough, we can adjust the track so that the end point meets up at the start point: first by adjusting the angles of each node, then by adjusting the position of each node.

These pre-made pieces can specify other details.  For example, could have some which are "city" (and hence we place buildings and lamp-posts nearby) and some are "country" (place trees or cactuses or whatever nearby).  Some pieces could be tunnels, or bridges, or a dark area with many large trees nearby.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on August 04, 2014, 07:02:08 AM
Quote
An approach which should be feasable and produce truly random tracks is this: start with a predetermined shape (e.g. circle, but have several) which consists of number of short line segments, maybe 100.  Then "iterate" to produce a new track by deformation, moving each vertex by a small random amount, while maintaining angle limits and ensuring vertices don't get too close to the track.  Keep iterating for so long, e.g. 500 times.  Would probably need to test the result is OK (e.g. not returned to a boring circle).  You could also create some features at the beginning (straights, chicanes, hairpins) and maintain those features during the iteration process.

What about this method? Your screen shows awesome results.
Any engine limit which prevents now this method? Or do you think the new method is better?
If first method is possible, but 2nd has advantages: Maybe a combination of both like oblige does currently?
Can user contribute shapes in a way if 2nd method is used - so that we have a very big archive to have it as less as repetitive as possible ?
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 05, 2014, 02:23:27 AM
I did consider that method, but I think it has a serious flaw: it would generate a lot of "bumpiness" or ripples in the track, like ~~~~~~, and not make curves on a large enough scale.

The method shown in the earlier screenshot is the simple method of joining two pre-made track-halves together.  For closed tracks it might be good enough (with a few more pieces), but it is not usable for open roads.

The method I am actually using should produce good results.  Below is a screenshot of the "rough" track (without smoothing).  The overall shape is interesting, yet it was made with only TWO pieces (a curve and a straight).
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 07, 2014, 05:04:09 AM
I have 2D layouts working fairly well now.

The attached zip has a closed track and an open track, TR2.TRI and CY1.TRI (Stadt)

Of course there is much more to do, there is no scenery to look at, and no slopes or twists yet.  But the user interface has been finished and is usable.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on August 08, 2014, 03:59:52 PM
awesome :-)

I found a minor bug though:

Your city1 seems to be longer than original length. The map shows finish line at original position and you drive the rest of the track out of the map:

http://abload.de/img/dosbox_2014_08_09_00_kou2b.png

If not fixable I dont care ;D

But this seems you can even alter the lengths of the track. Thats awesome. That even exceeds the possibilities I would have with the editor. The editor wouldnt allow me to make the track longer.

And you randomize even the scenery? Random tunnels on track and so on? wow ...
impressive work like always by you.
Thank you sooo much :)
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 08, 2014, 10:19:03 PM
Yes it is quite odd how the map lines disappear at the end, even though everything else seems OK.

Scenery (objects, buildings) and tunnels will be randomized.  Tunnels are interesting in that the road segments at the side are folded over the top of the road to make the tunnel.

TRACKED is quite limited.  It was also displaying the bitmaps on some tracks wrong, so I have made my own viewer for textures and sprites :
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 13, 2014, 06:51:27 AM
I found the following track fun to play, and thought you might too.

The track is TR1 (Rusty Springs).  It has slopes, but no scenery (making random scenery is proving to be a big challenge).
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on August 13, 2014, 03:42:18 PM
I love the slope where my ferrari nearly wants to jump :)

BUT:

(http://abload.de/img/dosbox_2014_08_13_23_o6ssp.png)

O.O

overlapping? Seriously? Why it works? wow...
well done. really. thats impressive that you got this working.
edit: Found this in tracked.doc :
Quote
Note that creating too sharp turns may result in some parts of the scenery
crossing each other. This can frequently result in display bugs in the game,
so you should check in the track viewer that there isn't too much overlapping.
So it seems to be supported, but you have to watch out for overlapping scenery it seems ;D

Also I love it, that you can change the track lengths. Thats awesome as well.
random lol thought by me: A tunnelonly track :D

An complete other question:

d:\NFSSE\SIMDATA\CARSPECS\

Do you see ANY possibility to modify them? ..

I would like to edit the car performances so much to have some variation here too. Especially I would like to change some gear ratios (longer, standard, and short) that would improve also the simulation feel of the game even more. Or imagine a high speed car with 50000 kg and 500 km/h crashing the traffic cars xDD I love doing stuff like that for fun xDDD

But changing gear ratios and so on would be so awesome. I'm sure taking off the 250 km/h limiter of the toyota would make it drive ~330.

But there is no editor at all to change the car performances. Any chance you can decode them?
I tried already hex editoring every single character by increasing the hex number. It just didnt work ._. (for nfs porsche it did. I found weight and some speed value^^ But porsche has an editor for this now anyway)
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 13, 2014, 09:00:30 PM
The game engine does not mind the track overlapping itself, but it can cause rendering glitches.  I plan to prevent it in the future, but for now it is not a big problem (and it only happens on closed tracks).

Tunnel only track is possible, but maybe a bit boring;)

Car specs: sorry that does not interest me.

Soon I will make a release of this program, and then take a break and work on other projects for a while (e.g. my DOOM editor).
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on August 14, 2014, 04:33:49 PM
Quote
Tunnel only track is possible, but maybe a bit boring;)

Sure :D But as you mentioned randomized scenery this came in mind :D

Quote
Car specs: sorry that does not interest me.

hmm :( :D

But if it would interest you: Is there a chance? The files are also very small, but contain the car data.
Is it such a hardcoded thing that there doesnt exist an editor for this?

Or say it else: Would it be possible for you to edit these files/understand these files and make a tiny spec editor for this? Just in theory.

Or are they absolutely hardcoded that there is absolutely no way? :(

can you pleeeease tell me that? That would really interest me.
and:
I would consider giving you a money donation if you're able to make such an editor for this. If you can somehow understand the files, a little interface for editing them would be hopefully not a hundreds of hours work. But however: please tell me if you would in theory able to understand the files.
I also wonder what makes a file "understandable" ?
I mean: NFS4's FRD Trackfiles or even the NFS 1 track files - it is the same like with the carspec files: You see in them only compiled machine code. And there is no source code available. So I wonder: What makes the files understandable? And why (if its the case) is the carspec file not?

Maybe you can clear things a little bit up. It makes me so sad to see the little spec files, but no editor for it : / The goal seems so close you see the files and so on and grmpf. :D damn you machine code. : /

Beside of that I'm looking forward for the randtrack program and thank you so much for this so far. I didnt expect you'll do it. Awesome and thank you very much.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 24, 2014, 09:33:31 AM
Understanding binary files can be a difficult process.  It is often called "reverse engineering".

One way is to make a list of everything you can think of that will be in the file, e.g. one thing might be the maximum car speed, and then look for these values with a hex editor.  When you think you know what something is, change it with the hex editor and see if it actually changed in the game.

Also comparing the files against each other can be useful too.  E.g. load two files in a hex editor in two different windows, and flip between them.  When some parts stays the same, try to think what the cars have in common.  When some parts are different, think about what is different with the cars.

Until now I have worked a lot with this game, and have figured out many things about the track format which was not documented before (e.g. the speed of AI cars can be controlled).  But I am tired of that.  Maybe in the future I can look at the car specs, possibly as paid work, but right now I am concentrating on making the first release of RandTrack.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 26, 2014, 04:56:11 AM
The 0.45 release is ready! :)

http://sourceforge.net/projects/randtrack/files/0.45/

I will be uploading a basic web-page for the program shortly.

Have fun ;)

P.S. web page is up now: http://randtrack.sf.net/
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on August 28, 2014, 04:13:51 PM
*____*

It does a really awesome job with the shapes. Totally random and fun to play :)

I have so much to say, I already forgot the most I think. But I try my best to remember all.
hm yes - where to start ;D

I think I start with the carspecs first:

I found this in the nfs spec file:

Quote
These files (one per player car) describe the car performance.

Usually, installing these files to the hard disk (by editing PATHS.DAT)

makes Need for Speed inoperable (no acceleration is possible) because the

game modifies SIMDATA\CARSPECS\BY_R&T. However this can be prevented by

making the check file read-only (run ATTRIB +R BY_R&T).



Note that copying one of these files on top of another one will affect the

car performance and handling, but not the engine sound. So if the max rpm's

of the two engines are not the same, the sound can get badly altered because

the correct sound sample is not available.



These files are somehow compressed, because by modifying a single byte in

the file one can reach various results such as : an instant system crash ;

a car that materializes under the road and cannot move, with 11 gears (!) ;

a car without front wheels, that keeps spinning at its initial position...

compression? Seriously?  :'(
That would explain why I got nothing via hex editoring every character to a higher value - I got the same issues like in the quote, but never a result.
Compression .. damn.. I fear this destroys any chance of reverse engineering these files at all?  :'(

___

I like it, that it also has a possibility for some high slopes like the one near of end of this track:

http://www.share-online.biz/dl/TYLAG1BNBW1

It was very fun. You drive down to a cave (which fits well on the deep area) After the cave you drive a huge slope up.

And Start/finish line has a good straight line for a good speed.

Shape:
http://abload.de/img/unbenannt130ymk34.png

Also some tracks it generated were nice to drive with the rallye mode physics. There was one vertigo ridge which was drivable whole track at full throttle at rallye mode. What a fun :)

Especially I found also a thing very impressive - especially for a first release:

You even consider traffic signs! It was so impressive to see that there were curve signs on sharper turns placed with correct placement and correct arrow direction. Thats awesome :)
It was also surprising to see a tunnel at autumn valley with even an never seen wall texture for a tunnel. Thats cool.
Your software has such an awesome quality - like always. Really impressive. Thank you!

Suggestions for the GUI:
Offer a tunnel probability setting
Offer a slope steepness setting (for example a setting on high would have a good probability of extra high slopes.

Slope steepness and some other stuff seem already to be different probabilities per track if I've seen correctly. If so - thats nice then and makes sense. Thank you.
_
It seems to me that there is no variable track width? Maybe you can randomize the track widths within a track as well.

I think when the curves settings is implemented, there will be with less curves a better possibility for straight parts?
At the moment I have long courses, but all with curves, and not much possibility to gain a good top speed.
Curves setting alone isnt optimal I guess though. Because this would make less curves, but not a track with lots of curves and sharp curves while having a top speed part as well.

Another thing:
I'd like to drive the original tracks backwards: If there is an randomize algorithm possible and newer nfs have backward direction possible without an extra track file for this - I would assume this can be computed like the mirrored versions which already nfs 1 does offer.

So would it be possible for you to upload us all tracks in backward direction? If it is possible via an algorithm I would assume it would be doable?
__

Here is a config.dat file for you which has all stuff unlocked!

http://www.share-online.biz/dl/CB9JH1BNQBP

This will help you with making the code for the vegas track then.
__

Quote
I suspect the speed value was created by a human player playing
  each track (rather well) and recording the speed at each segment.

Definitely!

The ai is goddamn accurate at especially Vertigo Ridge.

They drive in perfectly accurate speed the curves. No cheating - they drive the curves at the speeds with which the curves are possible to do. Its actually very accurate!
They even drive the ideal line most of the time. EA did a very good job here.


So far a huge thank you to your work!!

:)

I can offer you later a config.dat file with insane high times and insane low top speed for each track, so that you can actually fill record tables with the generated tracks.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on August 31, 2014, 04:26:36 AM
Yes if those carspec files are compressed (or encrypted) then it explains why nobody has been able to understand their contents -- it becomes extremely difficult to reverse engineer them.

I will add your suggestions to the TODO list.

Variable track width: this is possible.  I noticed that most tracks of the game are not varied much, so I did not worry about it for now.  Though RandTrack does make the road wider on corners.

When curves setting is implemented, there should be more straights and maybe larger curves.  If you want to play with it yourself, look at layout.lua script file and in PIECES table there are two straight pieces, try increasing probability there.  For larger curves, search for "scale_prob" in the code and increase it (upto 100).

I think a program to reverse a closed track would not be too hard to make.  (open tracks are harder since they are not straight near the end)

I don't need the unlocked config for Lost Vegas, thanks, because you can play it by copying the TRI file and FAM file onto another track.  Same for TR5 I think.

Actually with the AI speed I will need your help to get the AI speeds to be better.  Right now I suspect that RandTrack is making the AI cars too slow (right?).  I made the cars go slower around sharp corners, but it does not handle slopes yet.  Eventually I want to have a setting for it too, or does the game have a skill setting somewhere?
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on September 05, 2014, 03:38:42 AM
Quote
Yes if those carspec files are compressed (or encrypted) then it explains why nobody has been able to understand their contents -- it becomes extremely difficult to reverse engineer them.

I really wonder - why did EA protect them for that so hard o.o And this "by R&T" file lets me a little bit assume that they (R&T) actually wanted it :x Also EA makes me wonder that they even dont offer the sourcecode of this game even at this age of the game ..

Quote
I will add your suggestions to the TODO list.
Thank you :)

Quote
Variable track width: this is possible.  I noticed that most tracks of the game are not varied much, so I did not worry about it for now.  Though RandTrack does make the road wider on corners.

mainly the open tracks have it. For example city segment 2 or the alps.
It gives more variety if there is changing widths :)

Quote
When curves setting is implemented, there should be more straights and maybe larger curves.  If you want to play with it yourself, look at layout.lua script file and in PIECES table there are two straight pieces, try increasing probability there.  For larger curves, search for "scale_prob" in the code and increase it (upto 100).
Ok :)
I wish something like said in previous to happen as well from time to time (the "sharp and many curves while having also a top speed part example")
And variable slope lengths - I like for example the jump at lost vegas. I made a much more extreme version of this with tracked. It actually lets the supra fly to 330 km/h before it lands again on the ground :D

Quote
I think a program to reverse a closed track would not be too hard to make.  (open tracks are harder since they are not straight near the end)

hmpf thats a point :S

Maybe you can extend the end of the track so that it works?

Quote
I don't need the unlocked config for Lost Vegas, thanks, because you can play it by copying the TRI file and FAM file onto another track.  Same for TR5 I think.
Sure you can. But isnt it a lot more comfortable if you can just choose it in your game? :P Just copy over my config file and you're done. Or do you want to unlock them yourself? The time tables are replaced with the file as well then though if you take the config.

Quote
Actually with the AI speed I will need your help to get the AI speeds to be better.  Right now I suspect that RandTrack is making the AI cars too slow (right?).  I made the cars go slower around sharp corners, but it does not handle slopes yet.

Didnt know that you already had considered them in this version already. I've tested a little bit.

Its a bit strange sometimes. And its mainly the slopes - so yes I notice that the slopes arent done yet.

I got a decent AI on a rusty springs track. They were a bit slow on an upward slope, but rest of the track was pretty fast and challenging.

Now comes the strange part:

On a Autumn Valley they slow down on a light curve and a longer DOWNhill slope, while they were way too fast on the first sharp and shorter steep downhill slope. Rest of the track was ok if I remember right.

On a Vertigo Ridge the same: There was one area at which they were quite slow, again on a long downhill slope part. Rest of the track they were constantly too fast. So fast, that they even sometimes flew over my car on a sharper curve. Or sometimes I see a car crashed/slided away on the road (probably because he took the curve too fast :D )

I think it will be easier to do this step by step. Means that we first optimize it on normal curves (means testing tracks without any slopes)
I could imagine that they're already ok then. Because the rusty springs track worked well, except for the high slope. I'm unsure about vertigo ridge though. They were VERY fast on that track.

Quote
Eventually I want to have a setting for it too, or does the game have a skill setting somewhere?

Nope. The game doesnt offer any skill setting.
Title: Re: RandTrack : random race-track generator
Post by: Gadavre on September 23, 2014, 02:26:49 AM
Andrewj
Hello! I understand this program creates a random road tracks for nfs1 and special edition? Games are very good, but on large monitors unpleasant to play, and put a high resolution games impossible. Maybe if you are very fond of these games, it would create a program to optimize the resolution of the game on modern monitors?
Can we compete on your road tracks with cars bots?
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on September 23, 2014, 05:31:27 AM
You can use dosbox svn: http://ykhwong.x-y.net/

and use a scaler like 2x Sai. (or try some other - its a matter of taste)
With 2x Sai you lose a little bit sharpness, but it lessens aliasing a lot.

https://www.youtube.com/watch?v=jbr-FWeYCFI&hd=1 (watch on highest quality level to avoid getting fooled by youtubes video compression)

I play it on a 30" monitor.

AI - read my previous post - it isnt very well working at the moment.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on September 23, 2014, 10:37:59 PM
Games are very good, but on large monitors unpleasant to play, and put a high resolution games impossible. Maybe if you are very fond of these games, it would create a program to optimize the resolution of the game on modern monitors?
There is no source code for the NFS1 games, so it is impossible for anyone to make a "port" to modern systems.

With DOOM, John Carmack released the source code, which allows all the modern ports like PrBoom, ZDoom, Doomsday (etc) to exist.  Unfortunately the source code to most games never gets released (or worse, it is lost forever).

Currently the AI (bot) cars do work on the generated tracks, but their level is quite low.  For my skills (using a keyboard) they are usually a challenge, but for experienced players they are probably quite easy to beat.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on January 19, 2015, 11:33:57 AM
Quote
but for experienced players they are probably quite easy to beat.

They're too fast on vertigo ridge. Like mentioned in the past.

The AI also does a little bit suit your skill. They drive slower if you've bad skill. But they try their best if you have good skill.

https://www.youtube.com/watch?v=A6LOmbgD_lw&hd=1

I'm not a bad driver, but for lots of tracks especially at vertigo ridge tracks they are definitely too fast. On some other circumstances they are slower. But that doesnt matter that much.

I just have one big wish:

Can you please finish the other tracks at least? I can understand that you want more downloads for this program. But you also didnt advertise it anywhere like mentioned earlier, didnt you?

I mean seriously: Nobody would assume a random track generator for NFS 1 in a forum of a doom level random generator. Please put it on some nfs sites like nfscars.net and such. Or should I do that for you? But I think thats shit. Because its your program and not mine.

But please please please develop it further. You did such a fantastic start with it ..

Please do it. Or can I do it myself somehow? What would have to be done to support other tracks? I would be even ok if it would only generate the shapes, decoration was a nice addition, but main wish was random shapes.

If you would do this, if I pay you for the work, then tell me. Maybe I can afford it. But please dont let this project die :(
Title: Re: RandTrack : random race-track generator
Post by: andrewj on January 20, 2015, 01:53:03 AM
Relax man, I will definitely work on it again :).  Maybe in a few days time I do some stuff.....

When it is more complete (supports all the tracks), then I will go on some websites and promote it.  Yes that is my job, not yours.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on January 20, 2015, 03:39:29 AM
thx  :) :) :) :) :) :) :) :) :) :) :) :) :) :)  :-*
Title: Re: RandTrack : random race-track generator
Post by: andrewj on January 22, 2015, 04:07:10 AM
Did some work on open tracks.

Here is a very basic CY1 track you can try.  The track is a lot less curvy than closed tracks.  Finish position is wrong, I know.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on January 22, 2015, 01:42:42 PM
Looks promising :)

Did you change the AI again? On this track they are extremely slow now.
Just to inform you about that. The AI is a nice addition of course, but the track itself has to me of course the higher priority :)
But maybe it is because of the many and high slopes like you mentioned earlier.

And again: Thank you for all of this and thank you that you develop it further. Also big thanks that you develop oblige further.

And I'm still impressed how much quality your software has - already with RandTrack. Especially that it puts in completely new track decorations, corresponding traffic signs at turns and so on - just wow. I really had to say it again.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on January 24, 2015, 03:19:48 AM
I did not change the AI -- I think you can just drive at lot faster on tracks like this with less curves.

To make the AI speed be good, what it probably needs is to simulate a car driving along the track and do what players would do (slow down at sharp curves, accelerate along straights).

That requires a lot of work though.  For now I will concentrate on getting more tracks working.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on January 31, 2015, 09:20:29 PM
Today I worked on the "Drive Simulator" which simulates how a player would drive the track, and used to set the AI speeds.

I think with your help De-M-on, telling me if they accelerate too fast or slow along straights and take corners too quickly or too slowly, we can make the AI speeds be very good.

I will post a WIP package soon....
Title: Re: RandTrack : random race-track generator
Post by: andrewj on February 01, 2015, 09:09:55 PM
Here is the 0.61 WIP package for you to try.

Main changes:
+  every track can now be generated, BUT most of them are very basic (no scenery, no tunnels, etc)
+  new Drive Simulator for better AI speeds
+  better system for adding road signs
+  it no longer creates tracks which overlap itself
+  much reduced "car dropping" at start
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on February 02, 2015, 08:56:00 AM
Here is the 0.61 WIP package for you to try.

Main changes:
+  every track can now be generated, BUT most of them are very basic (no scenery, no tunnels, etc)
+  new Drive Simulator for better AI speeds
+  better system for adding road signs
+  it no longer creates tracks which overlap itself
+  much reduced "car dropping" at start

Thank you :) I'll test it :)

Quote
+  it no longer creates tracks which overlap itself

Does this cause problems? Or does it have an advantage for the generator to dont have this? Just asking - no criticism.

Quote
+  much reduced "car dropping" at start

Dont worry about it though. Even at an original track this happens. It happens at the bonus track Lost Vegas.

I also think that it wont be so easy to always avoid it at closed tracks, isnt it? I mean with height differences you have to ensure to connect start & finish again. And I think the car will jump if z axis is lower than "zero" level - which is already at lost vegas original track the case.

So I say: Dont get worried if there are cases where the jump will occur. :)

From your specs file:

Quote
Code: [Select]
b3 : special effect:
        1/ 3 is normal
           0 skews start of corresponding segment right
           2 skews end of corresponding segment right
           4 buzzing sound effect
       14/15 water sound effect
       12/13 is tunnel mode (draw a roof)
     5/16/17 occurs but unknown purpose

Maybe one of them is buzzing sound + speed decrease?

Because Vertigo Ridge you can drive on the gravel without losing speed on it, while at coastal you heavily lose speed if you drive on the gravel.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on February 02, 2015, 06:32:53 PM
Overlapping tracks cause some rendering glitches, plus it looks bad on the mini-map.  It also may be a problem if I support other games in the future.

I have not figured out yet what makes the coastal gravel slow down (with sound effect) -- it is probably in one of the b0/b1/b2/b3 values.  The "buzzing" effect in b3 is always there, used in tunnels I think (the echo from your car noise).
Title: Re: RandTrack : random race-track generator
Post by: andrewj on February 03, 2015, 02:16:16 AM
I just noticed that the AI speeds which RandTrack stores into the track are quite wrong -- much too fast.

So I suggest waiting for an updated WIP package, which I will make in a day or two.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on February 03, 2015, 02:27:31 PM
Yes that was really amusing xD

The Lamborghini got always top speed - no matter how many corners the track has :D
The understeering, slow acceleration Acura NSX was better than Supra, because of their top speeds :D
Only with the warrior car it is sometimes possible to match their speeds^^

Another Funfact: Even the traffic does rather race with their speed of 120 to 160 km/h :D

But before reporting - I was collecting first some more stuff like this one:

Quote
    +  it no longer creates tracks which overlap itself

... and whats that :P

http://abload.de/img/dosbox_2015_02_03_22_vdoo9.jpg

I liked how the balloons were scattered around the whole track. That looked cool.

Quote
It also may be a problem if I support other games in the future.

If this will happen in a future - NFS 4 High Stakes PLEASE. It is very well documentated and has a great community - just look at iplounge.net ( http://www.iplounge.net/forum/index.php ( especially this section: http://www.iplounge.net/ipl2/forum/viewforum.php?f=3 ) or at nfscars.net
For most old nfs fans, nfs 4 is the best nfs ever made. It is very mod friendly too. But its a newer engine too, you will have more things to consider then - I dont know how complex it is for a random generator. And you're right. Overlapping can cause invisible walls and heavy rendering glitches at NFS 4. Should be avoided at all costs there.

Thousand thanks for your effort so far. I really appreciate it. Thank you.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on February 03, 2015, 08:09:48 PM
Ah! that explains what some of the AI_INFO numbers mean, as I already knew the first one was the speed of the AI cars, so second or third number must be speed of traffic.  Cool.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on February 04, 2015, 02:15:16 AM
Here is another WIP with proper AI speeds.

I have added an adjustment control for each kind of track (open and closed).  The default is "High", which is meant to be similar skill as in the original tracks, so you should test that setting first.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on February 05, 2015, 05:46:05 PM
The AI is surprisingly good now :)

I drove this time only with keyboard, didnt had the wheel on the table at the moment, but shouldnt matter that much since the AI does a little bit adapt your speed as well like said earlier and b) I know the ai with keyboard at original tracks - so it seems very good now. Surprisingly good. I dont know how you managed that, but thats awesome :D
Overdrive feels doable with steering wheel and track knowledge. Would be interesting to try out. I will do it later.

To be honest if you think about it: It is really great to have the possibility to drive with ai, but didnt expect that it is doable :)
And nice - this offers possibility to play the tournament.

The image with the overlapping coastal track: Seems to be a bug of the minimap. At the NFS Viewer it doesnt overlap. Strange.

So again some suggestions / and misc:

->
Quote
Ah! that explains what some of the AI_INFO numbers mean, as I already knew the first one was the speed of the AI cars, so second or third number must be speed of traffic.  Cool.
I would assume the remaining value is then the speed of the cops? You could double it, they're too slow to be of any danger.
-> Again track width: At the moment it is so damn wide, that on one streetline would fit about 3 or more cars side by side instead of a normal street with 1 car width.
Why is it like this? To prevent rendering bugs with scenery? It feels this way more of a racetrack instead of a open city street. For a track like Autumn Valley it would be of course ok, but for the open tracks it looks rather wrong.
Some suggestion to this: Make the general width of the track dependent on the track and especially bring in variety in the width. Some wide roads, some narrow roads. This would already make the track shape less repetitive and more variety. And the general width maybe with a mixed up option. With mixed up can for example a narrow autumn valley happen.
-> Now a question: Is the generation track dependent, or always the same (except for closed vs open) ? It feeled the latter. But how about for example a higher slope possibility for the alps? ;)
Or Lost Vegas as a fast track has a higher possibility to be again a fast track by the generator. But if you do this - please offer a mixed up option, so that there stays possibility for example a narrowed autumn valley or a twisted streets city :D
-> Track lengths: Offer please for open tracks another length like "extreme" with for example 25km. Even nicer would be an additional input field for entering a fixed km number ( or a range )
for example if you type in 5 to 10 - randtrack will choose a random length between this range. and if you type in 25 to 25 it will be exactly 25km. Would be more variety as well instead of always the 10,5 km for "long".
-> For open tracks longer than 10km - maybe there is a great increased (or even 100%? ) possibility for addition of a long straight part (but one where you reach the top speed of even the ferrari etc)
This is somehow really missing. It seems there is absolutely zero possibility to have a straight that you can e.g. ferrari get to top speed. On a track longer than 10km there should be enough room to make for example a very difficult course with many curves but with an existence of a top speed part as well. At the moment I see this never happen. There were some faster parts of course, but never enough to get the top speed of the car (if its not a slower one). The long straight may contain sometimes long downhill or long uphill and a slope is sporadically ok too. Downhill with a slope it can even accelerate you higher than top speed while flying long enough into the air (lost vegas track for reference). Longer downhill/uphill elements are in general somehow missing, it does only the bigger slopes - and with a feeled tendency to put them in front of a curve xD
-> Offer possibility to drive the generated tracks backwards. ( A button like restore tracks would come into my mind ) For the open tracks you could make the start area longer as it is the case with the finish (but I fear its not possible due to the fixed car starting position of 0 0 0? But asking doesnt hurt )
-> Implement twist curves (the side angled streets you see at autumn valley and lost vegas for example)
-> Maybe more options like slope/steepness etc.
-> Fix the minimap if possible. It is really helping out much if you have the map showing you whats coming up next.
-> Make a mixed FAM file for the track so that you can use for example the hot air balloons on a city track (I assume lot of work and maybe impossible to do, but again : Suggesting things doesnt hurt I think ;) )


So far if I didnt forgot something.

Really good job with the AI. I have to say it again - awesome job with it. I think they dont need any change anymore. I'll try with Steering Wheel at weekend though.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on February 06, 2015, 04:14:14 PM
The third unknown AI value might be the police speed, but in the original tracks it is quite low, even lower than the traffic.

The minimap mucks up because the game engine must have a hard-coded length in it (for each track).  When I play the original City 2 track on City 1, it also mucks up (and I copied both CY2.TRI file and the CY2INFO file) -- so this length is not in TRI file and not in INFO file.  Only way to "fix" the minimap is to not have a Length setting and always make the track the exact same length as original -- bit of a shame to not have the Length control.

Road widths : yes more variation is planned for future.

Slopes : plan for future is have both a setting in user interface and also that each track specifies the normal amount of slopes.

Long, flat straights in open tracks : that is a good idea, will add to the TODO.

The "Long" setting for open tracks already reaches the limit of how long a TRI track can be -- it is not possible to go any longer.

Twisted curves are planned for future.

I have thought about the FAM files, it might be cool to make a whole new style of track (a whole new FAM file).  But for now I have many many other things to do ;)
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on February 06, 2015, 04:43:24 PM
Quote
The third unknown AI value might be the police speed, but in the original tracks it is quite low, even lower than the traffic.
Speaking of police - It seems they're missing in generated tracks. Seems they're only present in original tracks. Possible to add them? They have fixed spawn points, means the cops spawn everytime on the exact same positions. Maybe this is in tri file.

Quote
The minimap mucks up because the game engine must have a hard-coded length in it (for each track).  When I play the original City 2 track on City 1, it also mucks up (and I copied both CY2.TRI file and the CY2INFO file) -- so this length is not in TRI file and not in INFO file.  Only way to "fix" the minimap is to not have a Length setting and always make the track the exact same length as original -- bit of a shame to not have the Length control.

alright, then leave it alone. fixed track length would be a bad workaround for this minor problem.

Quote
The "Long" setting for open tracks already reaches the limit of how long a TRI track can be -- it is not possible to go any longer.

Damnit^^ Then offer a "mixed" option in addition to the settings please :) (or even better an option with: Random lengths. Means they could be a 9km track and a 5.7 km track and so on ;)

Quote
I have thought about the FAM files, it might be cool to make a whole new style of track (a whole new FAM file).  But for now I have many many other things to do ;)

Nice :)

oh and please try to find out the flags for the road effects. The alps segment 3 (the snow track) is drivable at sides without any harm at generated tracks. And at original it (nearly or even fully) completely blocks your steering in the snowy sides (and decreases your speed of course). (like you sure already noticed at original track).
Title: Re: RandTrack : random race-track generator
Post by: andrewj on February 06, 2015, 06:06:39 PM
Speaking of police - It seems they're missing in generated tracks. Seems they're only present in original tracks. Possible to add them? They have fixed spawn points, means the cops spawn everytime on the exact same positions. Maybe this is in tri file.
I just looked at City 1 -- I cannot see any special objects that would be police spawn points.  (If they existed, the original NFS specs would probably know about it)

There is nothing special in the b0/b1/b2/b3 values either.

I did see the speed limit signs used a few mores times, perhaps police cars spawn near these?

Otherwise their position might be hard-coded in the game engine.

Quote
oh and please try to find out the flags for the road effects
I have found (I think) the "gravelly" effect -- will apply it to tracks like AL3 in the future.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on February 06, 2015, 06:50:46 PM
Quote
I did see the speed limit signs used a few mores times, perhaps police cars spawn near these?

That sounds too weird and EA Canada has normally not such strange logics. So I would say - another hardcoded thing.

Also there are guarding cops. (not driving) for example the first cop at Alpine 1 is standing in place in the corner at the gravel and in opposite direction.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on October 25, 2015, 05:19:49 PM
I know you're very busy with oblige v7, just wanted to give info, that I'm still very interested in this to be continued.

Because I wasnt that frequently present on this forum. But thats only because I'm waiting for a finished v7. I have so much hope in the weird shape thing. The square rooms got a bit repetitive I must admit.
Title: Re: RandTrack : random race-track generator
Post by: Glaice on October 25, 2015, 07:24:53 PM
I'm pretty sure this is on the backburner or released as-is for now.
Title: Re: RandTrack : random race-track generator
Post by: andrewj on October 25, 2015, 08:49:13 PM
There is a 7.17 package of OBLIGE you can try -- future versions do not use the weird shapes anymore.

As for RandTrack, I am planning to get back to it, but want to work on V7 for a while yet.
Title: Re: RandTrack : random race-track generator
Post by: De-M-oN on October 29, 2015, 01:41:48 PM
Quote
As for RandTrack, I am planning to get back to it, but want to work on V7 for a while yet.

Thought so. Thank you!

Quote
There is a 7.17 package of OBLIGE you can try -- future versions do not use the weird shapes anymore.

Even not for caves/outdoors? Do you have something even better? Or how it comes to this decision?
Title: Re: RandTrack : random race-track generator
Post by: andrewj on October 29, 2015, 08:59:27 PM
I am experimenting with different methods.  Too early to say if it will be better or not.