Be the Boss of Your Game's Performance: Create Your Own Ticks

  • 4 favourites

Attached Files

The following files have been attached to this tutorial:

.capx

make-our-own-ticks.capx

Download now 173.95 KB

Stats

455 visits, 1,125 views

Translations

This tutorial hasn't been translated.

Tools

Hello, everyone!

This tutorial comes to you from a Facebook group called "Construct 2 + 3 Devs" and centers on boosting the performance of your projects by replacing "Every Tick" with your own custom ticks.

What I mean by this is, instead of using "Every Tick", we'll replace it with conditions that run "Every Third Tick". The framerate wont drop, because we'll segment one bit of code to 1/3 of the time, another bit of code to 2/3 of the time, and one more to 3/3, then start from the top.

This system is meant to replace the "Every 0.1 Second" condition people have been using, which is inaccurate as the tick rate is not synonymous with the time that has elapsed in game.

Actually, using this would be hypothetically the same as using our method for every second tick, although this method here is more accurate, and ultimately boasts much higher performance.

Fundamentally, what you're trying to achieve is to put some delay on code, as every tick can be cumbersome. Although, if you simply use "Every 2nd Tick" for the heavy code, the framerate will drop every time that second tick occurs, which will make the game feel jittery.

Instead, we want to evenly divide the total workload evenly between multiple ticks, and in this .CAPX you can see how it is done.

.CAPX

make-our-own-ticks.capx

Download now 173.95 KB
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!