Reduce Lag with Custom Elements

  • NDR149
    19th Sep 2016 Member 0 Permalink

    Is there a way to prevent insane lag with custom elements? Some of my own creations work fine in small doses, but cause game-breaking lag well before being used in great abundance.

  • jacob1
    20th Sep 2016 Developer 0 Permalink
    There are a lot of things that can be done to reduce lag. The most important thing is to reduce the number of times that tpt api functions get called. Minor stuff like only calling tpt.get_property once instead of twice can help a little.

    If there's something you want me to look at I could try to make it faster. Sometimes there just isn't too much you can do ...
  • jombo23
    21st Sep 2016 Member 0 Permalink

    write it in c instead of lua, then there will be barely any performance degredation unless youre doing insanely crazy shet

  • TPT_PL
    21st Sep 2016 Member 0 Permalink
    @jombo23 (View Post)
    You know...
    - Not everyone knows C
    - Not everyone wants their elements to be hardcoded...
    After that, I learn C, and I will try to code it.
    Off-topic: Are you still working on TPT Extended?

    @NDR149 (View Post)
    This whole thread is about superfluid helium, isn't it?
  • hax4life
    21st Sep 2016 Member 0 Permalink

    id not prefer hardcoding at all myself,also,if TPT laggs,then buy a proper pc unless when above 50k parts + all element ids occupied,i have a pc thats litterly still form 2006-2007,and it still doenst lagg that much for me,if it does,just throw ur pc out the window and buy a new one for more videoram/if you got <1 ram git 4 ram aswell,i only got 1,5G ram/2G vram < not sure,2 lazy to check ;P

    Edited once by hax4life. Last: 21st Sep 2016
  • NDR149
    21st Sep 2016 Member 0 Permalink

    @TPT_PL (View Post)

     That and a couple other elements I've been working on, yes.

    @jombo23 (View Post)

     I'm only good with lua at the moment

  • TPT_PL
    21st Sep 2016 Member 0 Permalink
    @NDR149 (View Post)
    Send me some in a conversation plz? :)
  • NDR149
    21st Sep 2016 Member 0 Permalink
  • jombo23
    22nd Sep 2016 Member 0 Permalink
    This post has been removed by jacob1: removed
    Edited 2 times by jombo23. Last: 22nd Sep 2016
  • jacob1
    22nd Sep 2016 Developer 2 Permalink
    This post has been removed by jacob1: removed
    Edited once by jacob1. Last: 22nd Sep 2016