Search the Community
Showing results for tags 'tabs'.
- 
	Hi guys, Recently I intend to keep my game running at the approximately same speed while the player switch to another tab, it means I need to keep my movieClip(animatedSprite) and Tween object(I am using GreenSock) running while losing tab focus, since RAF will stop, I use setInterval to keep updating PIXI.ticker.shared. const ticker = PIXI.ticker.shared; setInterval(() => { ticker.update(); }, 20); However, setInterval's minimum is limited to around 1000ms when the tab focus is blur, so my movieClip‘s update rate is the same, which is much slower. Now, i am thinking to record the deltatime and set the movieClip to specific frame accordingly on each update, then have to deal with the callback like onRepeat or onComplete, Is there a simpler way to achieve this?
- 9 replies
 - 
	
		
- switch tab
 - animation speed
 - 
					(and 2 more) 
					
Tagged with:
 
 
 - 
	I just finished my Phaser based MMO game and got a big problem. Please help me and sorry for my English. So: 1) I start my game in browser. 2) Then I do switch tabs and minimize the game in browser. 3) Then this command starts: this.game.state.start("game", true, false, ...); 4) And the problem is, that callback function "myState.preload" doesn't start before you switch back to the game.
 
