Page 1 of 3

Automation Track Builder - a visual track editor

PostPosted: Tue May 13, 2014 4:21 pm
by ElSaico
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:
http://uberwald-dev.net/automation-track-builder/

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:
* This will not change the subsequent corners, so things will likely look a bit weird.

A few things to be taken into consideration:
  • 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.
  • Right now, the import function expects the Scale field to be a division of two numbers. Sorry for those who used a direct value.
  • 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.
  • Those who want to look at the source code can access its repository: https://github.com/ElSaico/automation-track-builder

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

Re: Automation Track Builder - a visual track editor

PostPosted: Tue May 13, 2014 4:57 pm
by 07CobaltGirl
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.

Re: Automation Track Builder - a visual track editor

PostPosted: Tue May 13, 2014 8:09 pm
by 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!

Pike's peak, anyone?

Re: Automation Track Builder - a visual track editor

PostPosted: Tue May 13, 2014 9:19 pm
by Daffyflyer
That's excellent work!

Re: Automation Track Builder - a visual track editor

PostPosted: Tue May 13, 2014 10:21 pm
by SirStonelouse
you are awesome! :D

strop wrote: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!

Pike's peak, anyone?


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.

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 1:06 am
by RoninGT21
I might have missed something, but I can't figure out how to make clockwise tracks.

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 1:11 am
by Junny
If someone could post a simple Youtube "How to video" for us people who are useless :oops: we should see the great tracks just rolling in :lol:

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 2:43 am
by 07CobaltGirl
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.

Image
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. :)

SuzyQ.zip
SuzyQ track files (track.png, track.lua)
(743.74 KiB) Downloaded 540 times

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 2:48 am
by Pleb
Junny wrote:If someone could post a simple Youtube "How to video" for us people who are useless :oops: we should see the great tracks just rolling in :lol:

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

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 5:40 am
by ElSaico
Hello. Thanks for the feedback - and the compliments! :D

To answer a few things:

  • 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.
  • 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:
    The driving line is calculated in steps of 0.2 meters. This means that there can be some minor deviations in the driving line compared to your design on paper. For example, if you want to build a 90 degrees corner the simulation can step out of the corner at 90.1 degrees. You might have to tweak some values (especially after adding slopes) to reduce those small differences.

    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.
  • I'm a bit hopeless in the "how-to" field :oops:, so any contributions of that nature would be appreciated.

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 5:49 am
by Der Bayer
ElSaico wrote:At the moment, the game only allows for clockwise tracks.

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

ElSaico wrote:The driving line is calculated in steps of 0.2 meters.

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?

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 8:10 am
by ElSaico
Der Bayer wrote:
ElSaico wrote:At the moment, the game only allows for clockwise tracks.

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

ElSaico wrote:The driving line is calculated in steps of 0.2 meters.

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?

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.

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 8:11 am
by OCAdam
What language is this coded with?

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 8:22 am
by ElSaico
OCAdam wrote: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.

Re: Automation Track Builder - a visual track editor

PostPosted: Wed May 14, 2014 8:38 am
by OCAdam
Ah, I see. I was working on my own track editor, though I'm working with Java.