Shared Memory API

Discussion in 'Community Workshop' started by Mikael Hermansson, Jun 7, 2015.

  1. monzoom

    monzoom New Member

    Joined:
    Apr 2, 2015
    Ratings:
    +1 / 0 / -0
    Have i missed it, or is there a list of all possible values?
    In all available programms or apps, i mostly missed the sector times. i hope it will be possible. ;)
     
  2. Mikael Hermansson

    Mikael Hermansson Well-Known Member

    Joined:
    May 3, 2015
    Ratings:
    +48 / 0 / -0
    There's no formal list anywhere, no. You might be able to extract one from the C sample, even if you haven't done any programming before. The sector times have been mentioned before and is on our wishlist at the moment.
     
    • Like Like x 1
  3. monzoom

    monzoom New Member

    Joined:
    Apr 2, 2015
    Ratings:
    +1 / 0 / -0
    Good to hear, thanks for your reply. :)
     
  4. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Would it be feasible to create another shared memory object and keep the existing one for legacy apps? Then we could add all the interesting stuff we want without messing up the existing apps.

    For me, I'd like tyre wear as well as temps, and some info about other cars in the race. Whether the leader is pitting, the gap in front and behind, and maybe some other stuff I've not thought of yet :)
     
    • Like Like x 1
  5. Mikael Hermansson

    Mikael Hermansson Well-Known Member

    Joined:
    May 3, 2015
    Ratings:
    +48 / 0 / -0
    Yeah, we've talked about doing just that. There's really nothing stopping us from adding more stuff the current memory block though, so long as we just append to the end of it.

    The real motivation for having a new memory block would be so we could have some sort of version header which would allow us to remove and move stuff around without worrying too much about it. But that would still require any application dependent on any previous version to distribute an update to all its users, which is never fun.

    The solution I would want to see happen (in some distant future) would be to simply not expose the memory block at all (apart from for legacy purposes), and instead wrap everything in a nice stable interface through a DLL which we distribute either here or with the game somehow. Pretty much any language would be able to interact with it, either natively or through some FFI functionality. That way we could shuffle things around in memory to our heart's content and update the version only when there are breaking changes in the interface.

    Anyway, I've added tire wear to the wishlist. The gap ones should be doable as well. Tire temperatures are already in the API. Not sure about the leader one. I'll have to think about that one.
     
    • Like Like x 2
  6. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    That's ace, thanks for the info

    Oh, and now there's officially a wish list, can we also have the current tyre type for DTM 2014 and some flag indicating whether a mandatory pitstop is still to be completed ;)
     
  7. Mikael Hermansson

    Mikael Hermansson Well-Known Member

    Joined:
    May 3, 2015
    Ratings:
    +48 / 0 / -0
    Consider it added. :)
     
    • Like Like x 2
    • Winner Winner x 1
  8. Wozy_of_Salzburg

    Wozy_of_Salzburg Member

    Joined:
    Jun 22, 2015
    Ratings:
    +8 / 0 / -0
    I´m trying to write a little telemetry-analyser for R3E. Displaying the driven route per lap is working...
    I´ve tried to overlay illustrations of of the tracklayout I could find an the net (for Spielberg). But I could not manage to get them scaled right to the logged data... It looks like I´m mostly drive beneath the track :(
    So my question is: Is there any chance to get the layout of the tracks (just the contour would be great!) used in R3E?

    With kind regards
    Wolfgang
     
    • Like Like x 2
  9. Mikael Hermansson

    Mikael Hermansson Well-Known Member

    Joined:
    May 3, 2015
    Ratings:
    +48 / 0 / -0
    Are we talking 3D layout, or 2D? Not sure I can give you either, but one might be easier than the other.
     
  10. Wozy_of_Salzburg

    Wozy_of_Salzburg Member

    Joined:
    Jun 22, 2015
    Ratings:
    +8 / 0 / -0
    Thanks for your quick response :)
    2D would be great enough. It would be a handy tool to analyse what line is best (even to compare different laps)...
     
    • Like Like x 2
  11. Mikael Hermansson

    Mikael Hermansson Well-Known Member

    Joined:
    May 3, 2015
    Ratings:
    +48 / 0 / -0
    Figured I should post this here as well, since I just mentioned it in the pit crew thread.

    Here are some new values we're looking into adding to the memory block (in no particular order):
    • Flags
    • Pedal positions
    • Brake bias
    • Car damage
    • Whether pit limiter is active
    • Pit speed limit
    • Session time remaining
    • Lap deltas (from your best, from leader, etc.)
    • Sector deltas (from your best, from leader, etc.)
    • Tire pressure
    • Brake temperature
    • Tire wear
    • Time gap to car in front and behind
    • Whether there's a pending pitstop
    • Tire type (for DTM)
    • Whether AI is in control of your car at the moment (should help motion rigs)
    Can't promise we'll add them all, but we should be adding most of them soon enough. Just give me a shout if you feel something is missing.
     
    • Winner Winner x 1
    Last edited: Jun 26, 2015
  12. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Here's a list of stuff that I'd like to see in addition to what you've mentioned...

    session type (0 - practice, 1 - qual, 2 - race)

    session time remaining (in seconds?) -1 if this is a race with a fixed number of laps

    cut track warning counter (starts at zero)

    penalties disabled / slow down / drive through / stop-go (0 / 1 / 2 / 3)

    fuel usage enabled (0 / 1)

    tyre wear enabled (0 / 1)

    is in pit lane (0 / 1)

    is in pit box (0 / 1)

    mandatory pitstops enabled (0 / 1)

    mandatory pitstop is completed (0 / 1)

    pit window open lap (or -1 if the race has no mandatory pitstops or the race is a fixed time rather than number of laps)

    pit window closed lap (or -1 if the race has no mandatory pitstops or the race is a fixed time rather than number of laps)

    pit window open time (or -1 if the race has no mandatory pitstops or the race is a fixed number of laps rather than fixed time. Not sure about units - I suppose it would be the same unit as the race time left)

    pit window closed time (or -1 if the race has no mandatory pitstops or the race is a fixed number of laps rather than fixed time)

    track name (not sure how this would be represented - I guess you could expose it as an Int and publish a separate lookup table. Not a nice solution but I can't think of a nice way to do this - it's just a nice-to-have anyway)

    current track's lap record for the selected car class (again, a nice-to-have)


    values for pit window open / close (and maybe number of laps allowed on the option tyre) are really useful for me because it means I don't have to re-do (and potentially mess up) a calculation that the game has already done
     
  13. Mikael Hermansson

    Mikael Hermansson Well-Known Member

    Joined:
    May 3, 2015
    Ratings:
    +48 / 0 / -0
    That one I'm not sure about. I'll have to look into it.
    I'll probably leave that one for later. Anything of variable length makes me a bit shaky in the knees. As does the thought of having to maintain a separate list for all the track names.

    The rest seems doable. They might morph or collapse into other ones, but should end up in the block in one form or another. :)
     
    • Wonderful Wonderful x 1
  14. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Brilliant. I can live without the 'is in pit lane' one, so don't let it hold things up. I know what you mean about the track lookup - potential pain in the backside. I'm not sure I'd use it anyway - having the current lap record for the class / track would be enough
     
  15. Tuborg

    Tuborg Well-Known Member

    Joined:
    Feb 4, 2015
    Ratings:
    +455 / 0 / -0
    The wind effect in Simvibe doesn't work anymore, has that anything to do with this API or is Simvibe the problem?
     
  16. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    please don't forget some sort of version field
     
  17. Mikael Hermansson

    Mikael Hermansson Well-Known Member

    Joined:
    May 3, 2015
    Ratings:
    +48 / 0 / -0
    We haven't changed anything yet, so must be something on Simvibe's end.
    As I've already mentioned several times now, we will strictly be appending to the end of the shared memory block, so no version header needed. If/when we do any breaking changes we'll probably roll out a proper DLL API instead of the shared memory stuff.
     
  18. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    sorry, for not catching it before ;) given the enforced updates, having multiple versions of r3e in the field is indeed not an issue...

    seconding this, 2d positions of left & right track, doesn't have to be super high sampling rate of the splines. It can be done manually by driving slowly along the track limits, but a bit of a pain, would rock if it was possible for you to provide them.
     
  19. Tuborg

    Tuborg Well-Known Member

    Joined:
    Feb 4, 2015
    Ratings:
    +455 / 0 / -0
    Thanks for the quick reply!
     
  20. Tuborg

    Tuborg Well-Known Member

    Joined:
    Feb 4, 2015
    Ratings:
    +455 / 0 / -0
    One more..

    The number of effects in Simvibe differ depending on the game . I guess it depends on the data stream the games emits .

    Will we be seeing any improvements or changes here?