Guide: Reducing Lag
#1
On Buildism, lag is the term used when the game runs noticeably slower than usual. These things can cause lag, so reducing one or more of them in your game can make it run much better.
  • Moving Parts - Having a lot of parts moving at once means more work for the physics engine.
  • Overlapping Parts - This usually doesn't cause problems, but for every two parts that are overlapping, a "pair" between them is created (even if they are fixed.) It has to go through all of the pairs during every frame. If there are thousands of pairs in the game, this can take too long.
  • Drawing Lots of Parts - More than a few thousand parts visible at the same time.
  • Inefficient Scripts - Try not to use too many scripts with infinite loops. Always use a sleep() in these loops, and increasing the sleep time can help if you have lag problems.

Holding down F7 shows you some information that may be useful for optimizing a game.
Reply
#2
Other hints:
  • Try not to smash stuff up too many big boxes. The box-break feature is awsome, but when boxes smash, they turn into lots of moving parts. As Jacob_ explained, that's two causes of lag.
  • If you're in multiplayer, there could be a slow internet connection by you or there may be too many players in the server.
Reply
#3
Cool guide Jacob_! Big Grin
Reply
#4
(05-24-2011, 02:13 PM)Qwertygiy Wrote: Other hints:
  • Try not to smash stuff up too many big boxes. The box-break feature is awsome, but when boxes smash, they turn into lots of moving parts. As Jacob_ explained, that's two causes of lag.

I should add, make sure you don't have the MaxForce property too low. If it's too low, the box could try to break into the smallest pieces possible when hit with even a medium force.

If you use breakable parts, I suggest making a script that automatically cleans up the fragments every once in a while.
Reply
#5
Cool Erm, actually, that's a hack.
Reply
#6
There's no way for a script to reduce lag.
Reply
#7
Ok sorry I didn't know that.
Reply
#8
I know it's a big problem in ROBLOX that lots of scripts create more lag.
It's probably the same in buildism, as Lua works the same way in Java
[Image: 5widdh.png]
Siggy by McNoobster!
[Image: loading.gif]
Reply
#9
Indeed. Many a game, even some of my own, have been doomed by too many seperate scripts that could be used better as one single script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)