1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

Similar code running bogs down in Vehicle Lua but not in GameEngine Lua

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by angelo234, Apr 7, 2021.

  1. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    540
    So I'm making a mod and am converting the current GameEngine Lua code into Vehicle Lua code because I want the Lua code to be executed when I add a part to the vehicle part's list. After converting the code, I profiled both codes using the "LuaProfiler" module and they both executed under 1ms. But for some reason, the similiar code I wrote completely bogs the game down running in Vehicle Lua (around 10 FPS), but running it in GameEngine Lua barely makes any impact (around 60 FPS). Does anybody know why this is the case?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice