Results 1 to 7 of 7

Thread: missing link: how to program a Enhanced Object Script Editor

  1. #1
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    19

    missing link: how to program a Enhanced Object Script Editor

    I assume that the community has cool Enhanced Display Objects.

    Before I retired, I was had a 40+ year career writing software on many machines, in many languages, etc.

    The RaceRender documentation talks a bit about the "Enhanced Object Script Editor"
    which I take it is how one programs an Enhance Display Object.

    I'm missing some basics here. How do I invoke this script editor?
    The documentation hints that it is a C-like language, which is typical, there are many C-like scripting and programming languages.
    One typically has a text file that you write the program in, and then evoke a compiler/interpretor/processor that can create a binary executable such as a RaceRender .rro file. These are clearly binary, maybe even a bytecode.

    I also assume that the community has some objects in the source script that I can use to write the equivalent of "Hello World"

    I'm clearly missing something. Can someone help me out?

  2. #2
    The Enhanced Object Script Editor is only available on the Display Objects under the Enhanced Display Object category (at the bottom when you're selecting an object to add). Most of mine are lap list type objects, so I added the basic Lap List to my project. Then in the Display Object Properties, there's an "Open Script Editor" button. This opens the Enhanced Object Script Editor.

    From here, you can edit the Object Parameters (such as Data Field, Colors, size, etc.), Background Script (executed once), and the Foreground Script (executed for each frame). RaceRender only has a basic text area with some basic descriptions of the available functions on the right side; so I put together a custom Eclipse format so that I can program with an actual IDE and then just copy/paste the background and foreground scripts into the editor. Some of my examples are available here: https://github.com/dmcfarl/RaceRende...stom/autocross

    I've found the editor to be extremely powerful and customizable, and love that I can make it look exactly the way that I want. After you've got your display object working correctly, I highly recommend clicking the Export button in the Display Object Properties so that RaceRender will save it a .rro file to be used in future projects or shared with others. You can also export your entire project layout as a template so that your next video can be loaded up with all the display objects in the exact same place.

    Happy coding! Let me know if you're still stuck anywhere.

  3. #3
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    19
    Thanks, I'll go fire up RR and hunt around some.

    I was hoping for a github example directory.
    I've used Eclipse in the past but for some reason I keep leaning back to VIM.

  4. #4
    VIM can do a lot, but it's really nice to just hit Ctrl + Shift + F and just have everything be formatted correctly. One of the biggest things that I forget is that if-statements do not have a space after them. So, having Eclipse format the code helps me not need to worry about why a variable called "if" is getting set and nothing inside the statement is actually happening... It can require some trickery to make the loosely typed RaceRender implementation work in a strongly typed Java setting, but I generally find it more helpful than not.

    Here's a good example of a Formula 1-styled lap list:
    https://github.com/dmcfarl/RaceRende...k/LapList.java

    It requires some preinstalled fonts, but otherwise looks pretty good in my option. You can generally ignore the class variables and constructor; the background and foreground script "methods" are what would be copy/pasted into RaceRender.



    I'll get around to posting them here one day...

  5. #5
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    19
    Quote Originally Posted by HoboBob View Post
    The Enhanced Object Script Editor is only available on the Display Objects under the Enhanced Display Object category... Then in the Display Object Properties, there's an "Open Script Editor" button. This opens the Enhanced Object Script Editor.
    Using my Bar / Level EO with the "Pitch bar" style as an example, I can bring up the "Display Object Properties" popup display window. And I see all the color, data field, size, positioning controls.

    But I'm not seeing anything about Scripts, either Background or Foreground.

    At the bottom of the popup dialog box the lowest two lines are "edit clipping area" and Color Channels checkboxes.

    So I still am missing something fundamental.

  6. #6
    Quote Originally Posted by PatFarrell View Post
    Using my Bar / Level EO with the "Pitch bar" style as an example, I can bring up the "Display Object Properties" popup display window. And I see all the color, data field, size, positioning controls.

    But I'm not seeing anything about Scripts, either Background or Foreground.

    At the bottom of the popup dialog box the lowest two lines are "edit clipping area" and Color Channels checkboxes.

    So I still am missing something fundamental.
    The "Open Script Editor" button is only available on objects of type "Enhanced Display Object". Track Maps, G-Forces, Bar/Levels, and 2D Graphs are all specific types that have some parameters that can be tuned, but don't have wide open functionality enabled like the Enhanced Display Objects. Gauges, Speedometers, and Tachometers have a kind-of halfway implementation with the Gauge Designer which provides some pretty advanced functionality for circular style gauges, but again, can't access the code itself. Some Gear Numbers, Lap Counters, and Timers have the Enhanced Object Script Editor enabled, but not all of them. You need to be working on one of the Display Objects that has the "Open Script Editor" button in the center of the Display Object Properties for you to be able to actually edit "lower" level code.

    It is fairly easy to create your own though, so that might be your best option.

  7. #7
    Tuner in Training
    Join Date
    Apr 2021
    Location
    outside Philadelphia PA
    Posts
    19
    I found the button it was hiding in plain sight in the middle of the dialog box.
    Thanks

    I will probably have to create some code. I would expect the Speedometer to have a bit of dampening but I'll have to check the source code.