Platform Builder Forums

Help and Support => Tutorials => Topic started by: Antikore on February 10, 2020, 12:25:30 PM

Title: Tips & Tricks for Optimization
Post by: Antikore on February 10, 2020, 12:25:30 PM
Platform Builder it's quite laggy right now. It has been laggier, but even with the fixes TingThing made, still we need from our own code to be most optimized as we can.

Here are some tips & tricks:

1.- Avoid looping increases performance:
Looping decreases performance a lot, for example, when using custom huds, performance decreases a lot if we update the hud constantly. To fix this, instead, update the hud parts when something has changed it. If you collect a coin, you update the coin counter in the hud, but not constantly. I checked this and it's impressively helpful. If you use looping only when it's necessary, performace will be very better.

2.- Avoid cluttering a lot of tiles in the screen:
Tiles seems to break performance, when you use a lot of tiles and you can see 'em all within the screen.

3.- Minimize code as you can
Less lines of code easier for PB to execute them.
Title: Re: Tips & Tricks for Optimization
Post by: War on February 10, 2020, 12:43:34 PM
Platform Builder it's quite laggy right now. It has been laggier, but even with the fixes TingThing made, still we need from our own code to be most optimized as we can.

Here are some tips & tricks:

1.- Avoid looping increases performance:
Looping decreases performance a lot, for example, when using custom huds, performance decreases a lot if we update the hud constantly. To fix this, instead, update the hud parts when something has changed it. If you collect a coin, you update the coin counter in the hud, but not constantly. I checked this and it's impressively helpful. If you use looping only when it's necessary, performace will be very better.

2.- Avoid cluttering a lot of tiles in the screen:
Tiles seems to break performance, when you use a lot of tiles and you can see 'em all within the screen.

3.- Minimize code as you can
Less lines of code easier for PB to execute them.
Everyone should follow these tricks else their games succs
Title: Re: Tips & Tricks for Optimization
Post by: Antikore on February 10, 2020, 12:47:07 PM
Yeah!
Title: Re: Tips & Tricks for Optimization
Post by: CGM on February 10, 2020, 02:07:22 PM
Looping commands aren't a problem, but tiles are. You need to use expandable tiles every time it makes sense.
Title: Re: Tips & Tricks for Optimization
Post by: Antikore on February 11, 2020, 12:26:31 PM
Looping commands aren't a problem, but tiles are. You need to use expandable tiles every time it makes sense.
Looping commands are more a problem than you can think.