Juggles 18 Share Posted April 16, 2016 I created a script that runs very fast and has fast interactions but now my computer lags when I try to run two bots. Is this due to the script I made? Link to comment Share on other sites More sharing options...
Hashtag 8692 Share Posted April 16, 2016 Don't call expensive methods every loop and increase the time between loops. Link to comment Share on other sites More sharing options...
Cardozz 46 Share Posted May 5, 2016 And try to make as less objects as you can. ("new" keyword). I once accidentally created new objects inside my onLoop() method. This wasn't visible while running the bot, but it kept making the objects over and over until my CPU and RAM memory couldnt handle the data anymore. My computer crashed and burned down and i had to buy myself a new computer. - just kidding - over time it made so many objects that my pc slowed down to like 2 FPS. Link to comment Share on other sites More sharing options...
Mad 86 Share Posted May 6, 2016 Increase the sleep time between loops, if you have it super low (like 0), then complex calculations like WorldToScreen etc, maybe even getNPC blah blah, will use ALOT of cpu because they are being called a large amount of times per second. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.