Herbert

Members
  • Content count

    11
  • Joined

  • Last visited

  1. thanks ivan.popelyshev, it works like magic
  2. hi ivan.popelyshev, Sorry I didn't make my question very clear, what I want is movieClip keep playing when I switch to another tab, since RAF stop when I lose the tab focus, I use setInterval continuously update ticker to keep movieClip playing, I hope it updates every 20ms, however, seems like while I lose the tab focus, the setInterval ignore my 20, It only do it every 1000ms, I believe it's browser's feature to save performance. so ticker.update is called every second only, which makes the movieClip only change it's frame every second as well.
  3. 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?
  4. hi themoonrat, thanks for your answering, it is very helpful
  5. hi themoonrat, thanks for your answering, it is very helpful
  6. hi rich, thanks for your advice, we will spend a while more to find the problem.
  7. hi rich, thanks for your advice, we will spend a while more to find the problem.
  8. Hi there, for some low performance devices, phaser's webgl renderer doesn't work, but when I try pixi V3, it goes well, so I am wondering is there any chance to use PIXI V3 renderer in Phaser?
  9. Hi guys, since webgl will cause some problems for some low performance phones(screen blinking or couldn't show at all), sometimes we are forced to use canvas instead, but the number of sprites showed in the game really influence the performance a lot for canvas, we use cacheAsBitmap to resolve it, but seems like cacheAsBitmap is very memory consuming, it will cause the game crashed for some low performance device(perhaps memory not enough) maybe I didn’t use it correctly, could anyone answer my following question so I can use it more properly? if there is a sprite and it doesn’t move or change at all, will it be kept redrawing by renderer? if so, does it mean that a moving sprite consume the same performance as it to a static sprite? should I use cacheAsBitmap to a single sprite(as I tested the performance improved), or I should only use it to a group which contains numbers of sprites? I have a group contains 40 sprites, those sprites only change their visibility(i.e. sometimes show only 20 of them), I set the group’s cacheAsBitmap to true after i set the visibility to it’s children, and I will set it to false when I need to change the visibility of those sprites again, is it proper to use cacheAsBitmap this way? when I set cacheAsBitmap to false, would it release the memory? any other suggestion will be appreciated:)
  10. Hi guys Recently I'm testing my game on iphone7, I found out that the phone heat up very soon even though I have not started playing it, so basically there are just around 30 static sprites. When I reduced the number to less than 10, the temperature drop obviously. Eventually, this problem is resolved by changing the renderer from Phaser.AUTO to Phaser.CANVAS, but I don't understand why the canvas perform better than webgl, and why it only happens to iphone7(on iphone6+ or 7+ are totally fine), has anyone had the same problem can explain it to me?