Automation Track Builder - a visual track editor

Hi, folks.

Some of you have noticed, in the BRC thread, that I had a suspicious-looking “Coming soon…” screenshot in my signature.
As it indicated, I was working on a visual editor for test tracks.

So, after a few days of interface adjustments, battles against the libraries and trigonometry hijinks, here it is:
[size=200]uberwald-dev.net/automation-track-builder/[/size]

See the racing line over your nice-looking background and change every possible value on-the-fly. You can even select any corner* to change! :mrgreen:
[size=85]* This will not change the subsequent corners, so things will likely look a bit weird.[/size]

A few things to be taken into consideration:
[ul]
] This is a 100% client-side web application, so 1) it’s a bit heavy, and 2) it can be hosted anywhere. Future plans include a downloadable version for those who want to use it offline./:m]
] Right now, the import function expects the Scale field to be a division of two numbers. Sorry for those who used a direct value./:m]
] Some breakage might be experienced on other, unpredicted cases (the parsing algorithm is somewhat fickle, as it handles a raw Lua AST). Feel free to submit reports./:m]
] Those who want to look at the source code can access its repository: github.com/ElSaico/automation-track-builder/:m][/ul]

A tutorial is available to help understanding how to use this: viewtopic.php?f=36&t=4179
Enjoy!

Definitely going to give this a look tomorrow night!!! My first track build was so tedious…took about 8 hours of tweaking to make it follow the track.

Wow, just wow, this will be amazing! Just wanted to say that I’m extremely grateful for your efforts putting this together, and I look forward to seeing the tracks roll in!

[size=85]Pike’s peak, anyone?[/size]

That’s excellent work!

you are awesome! :smiley:

[quote=“strop”]Wow, just wow, this will be amazing! Just wanted to say that I’m extremely grateful for your efforts putting this together, and I look forward to seeing the tracks roll in!

[size=85]Pike’s peak, anyone?[/size][/quote]

i actually had something of a pikes peak challenge in mind to run after this round of the BRC.
obviously the track should only be released to the public after the challenge so that people can’t practice till perfection.

so if people would leave this track alone for the time being i would organize something if there is interest.

I might have missed something, but I can’t figure out how to make clockwise tracks.

If someone could post a simple Youtube “How to video” for us people who are useless :blush: we should see the great tracks just rolling in :laughing:

Gave this a test run this morning. It’s a bit of a learning curve, but it works quite well. I made a replica of Suzuka with it in about 30 minutes, but it needs quite a bit of tweaking. You can’t really “trust the line” being drawn when used in the game.

Here is what it looked like in the Automation Track Editor.

Run it and see it comes out quite different. Close, but different. I will work on it more tonight after work. Still, a much easier way of doing it! I spent about 3 1/2 hours on it before, and only got to the left end of the track. :slight_smile:

SuzyQ.zip (744 KB)

When I actually learn how to use it correctly, I’d be willing to make a ‘How-To’ video. :slight_smile:

Hello. Thanks for the feedback - and the compliments! :smiley:

To answer a few things:

[ul]
] At the moment, the game only allows for clockwise tracks. As soon as the track specs allow for a counter-clockwise option, I’ll add it./:m]
*] About the differences between the plotted driving line and the actual one, I have two suspicions: either accumulated rounding error is in effect (which wouldn’t be surprising, given the amount of floating-point calculations involved), or… something for the how-to thread I’ve just noticed:

Which might be the way the game addresses the rounding issues in the first place (just conjecturing, here). Either way, this problem is going to be investigated further./*:m]
] I’m a bit hopeless in the “how-to” field :blush:, so any contributions of that nature would be appreciated./:m][/ul]

The game does allow for counter-clockwise tracks. The car always starts from left to right. Imagine an oval with left corners → counter-clockwise.

That has to be the cause of the differences. I don’t know how you draw the track, but probably in steps, too? If yes, adjusting the step size to 0.2 meters will probably solve the issue.

But there is one thing I am not sure about in your tool: The corners all look very sharp, there’s no smooth transition between straights and corners. Or am I just too stupid to use your tool?

[quote=“Der Bayer”]

The game does allow for counter-clockwise tracks. The car always starts from left to right. Imagine an oval with left corners → counter-clockwise.

That has to be the cause of the differences. I don’t know how you draw the track, but probably in steps, too? If yes, adjusting the step size to 0.2 meters will probably solve the issue.

But there is one thing I am not sure about in your tool: The corners all look very sharp, there’s no smooth transition between straights and corners. Or am I just too stupid to use your tool?[/quote]

The corners are drawn by calculating the center and destination and making a quadratic curve out of them. This means I need to work on an iterative (parametric?) approach to achieve a similar result with the game.

Each one of them is drawn individually - couldn’t find another way to make them selectable - hence the gaps. I just thought of a way to fix this, though.

What language is this coded with?

JavaScript. The surrounding environment (npm, Grunt, Bower et al) is quite nice, plus it allows for cross-platform development.

EDIT: update released! Those ugly corner joints were smoothened out, plus I fixed an error with importing the track file in Windows.

Ah, I see. I was working on my own track editor, though I’m working with Java.

This could possibly be a dumb question, but why are you using a quadratic equation to estimate the path of the corner? surely it would be more sensible to use the equation of a circle:
(x-a)² + (y-b)² = r²

centre = (a, b)
radius = r

I have no idea what your maths abilities are, so here is a better explanation if you need it: mathsisfun.com/algebra/circle-equations.html

Well, this track I did was a rush job before going to work this morning. I will play with it more tonight to see if I can learn how to correct it. One thing I had trouble with was getting “sweeping turns” to come out as expected using the line, which is why I said it can’t be trusted implicitly. One thing I did learn is, if you append the next section after a curve, it becomes a LOT easier to form it using the visual aid. Overall, I really like this. As stated before, with the track I showed I spent 3.5 hours and only got about 2/3 around but managed this “pretty close” attempt in only about .5 hours. Much, MUCH faster with this tool. It’s just a matter of learning the quirks. The slowet part of doing them manually (at least for longer tracks) is waiting the 1-3 minutes for the simulation to run so you can see how you need to correct it. This is instant on changes, which is a HUGE help. Thanks for taking the time to make it. :slight_smile:

[quote=“Reaper392”]

This could possibly be a dumb question, but why are you using a quadratic equation to estimate the path of the corner? surely it would be more sensible to use the equation of a circle:
(x-a)² + (y-b)² = r²

centre = (a, b)
radius = r

I have no idea what your maths abilities are, so here is a better explanation if you need it: mathsisfun.com/algebra/circle-equations.html[/quote]

This kind of curve is built into the API; only the origin, destination and middle point are necessary. And those are a matter of basic trigonometry.

[quote=“SirStonelouse”]i actually had something of a pikes peak challenge in mind to run after this round of the BRC.
obviously the track should only be released to the public after the challenge so that people can’t practice till perfection.

so if people would leave this track alone for the time being i would organize something if there is interest.[/quote]

Okay then! I would love to participate in something like this, but it seems modelling all 130something turns in Pikes Peak would be quite the task!

I shall await further news of this.

[quote=“strop”]

[quote=“SirStonelouse”]i actually had something of a pikes peak challenge in mind to run after this round of the BRC.
obviously the track should only be released to the public after the challenge so that people can’t practice till perfection.

so if people would leave this track alone for the time being i would organize something if there is interest.[/quote]

Okay then! I would love to participate in something like this, but it seems modelling all 130something turns in Pikes Peak would be quite the task!

I shall await further news of this.[/quote]

luckily i have some spare time next week, let me see how far i get. :smiley: