.
Results 1 to 6 of 6

Thread: TNI Train Physics Interface: Status and Possible Use Case

  1. #1

    Default TNI Train Physics Interface: Status and Possible Use Case

    Hello,

    I was wondering if it is possible to have a discussion about Train Physics Interface. It is currently marked as not implemented on the wiki, but I wish to know what would be the scope of it, and the possibilities it provides and whether it fits my use case.

    I think it would greatly improve the driving experience and make Trainz more competitive in that regard.

    I have working prototype of a train physics model written completely in script from the ground up. It includes everything starting from setting tractive effort and resistance per-vehicle via a method call and configuring pneumatic brake schemes based on graphs, calculating idle, rolling, aerodynamic and track curvature resistances to calculating final velocity and applying it to the train and then offsetting the vehicle meshes to approximately simulate dynamic reactions in the consist.

    I would like to try reimplementing it as a TNI library. I don't think current prototype is a workable solution, even though it worked surprisingly well for what it is. Firstly, because I don't think it should be done via scripts ideally and secondly because Train.SetVelocity does not work on owning clients in the multiplayer, which makes this prototype inherently unusable there.

    With all that, I would like to know if it is possible to discuss TNI Physics with implementing such system in mind, and if there is chance to implement such system at all.

  2. #2
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,668
    Blog Entries
    30
     

    Default

    There is a TNI discussion channel in the Trainz Discord server. There is a user there (rileyzzz) who is doing some clever stuff with TNI.

    Paul


  3. #3
    Join Date
    Oct 2020
    Location
    Dusseldorf, Germany, Kiev, Ukraine
    Posts
    4
     

    Default

    Can you share more information, please?

  4. #4
    Join Date
    Nov 2006
    Location
    Czech Republic
    Posts
    891
     

    Default

    rileyzzz should be microlem trainz registered user....

  5. #5
    Join Date
    Nov 2006
    Location
    Australia, Qld
    Posts
    6,281
     

    Default

    Hi agentmike - you have a PM.

    We're soon to release a full TNI Physics API where users will be able to hook into most of the train physics and create custom plugins. Plugins are written in C++ rather than script. You can see more about TNI here.

    Also, robfletchs you'll need to sort out your Trainz registration. If you purchased on a different account please contact helpdesk to arrange to transfer or merge things.
    Tony Hilliam

    Got questions about TRS19? Click here for TRS19 FAQs

    Looking for answers to in-game functionality? Click here for help

  6. #6
    Join Date
    Oct 2020
    Location
    Dusseldorf, Germany, Kiev, Ukraine
    Posts
    4
     

    Default

    Thanks for update

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •