All the ways a behvior can update itself

For developers using the Construct 2 Javascript SDK

Post » Wed Jan 21, 2015 5:26 pm

Hey everyone,

I was wondering about the ways in which behaviors update each tick.

I know the the pre and post ticks and just tick in general, but is their a fixed update call? Like something that calls the behaviors "OnFixedUpdate()" It could be usefull for some things that need frame independence but also need a fixed timestep... I have seen such things in other game engines so thought something of the sort may exist here too.
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Wed Jan 21, 2015 10:24 pm

What would that even do? If the framerate is low its cause the system cant keep up, you cant work around that without using web workers. You also need to use timedelta with tick for "framerate independent" behaviour.

Nothing is stopping you from rolling your own "setInterval" into the code, but executing at random times middway through events will never be better than using tick or tick2
B
77
S
13
G
8
Posts: 1,974
Reputation: 9,893


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests