Jump to content

chusek

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by chusek

  1. I looked into the past. http://www.html5gamedevs.com/topic/13806-comparing-performance-of-phaser-207-and-230/?hl=performance http://www.html5gamedevs.com/topic/11861-performance-issues-after-upgrading-to-version-222/?hl=performance#entry72162 People has similar problems. One thread suggested removing the spiraling thingy fixes the problem. So I learn to use grunt (wasn't hard). And remove the spiraling in Game.js and rebuild the thing. It fixes the sluggish TWEENING but performance is still horrible.
  2. -This is Phaser + Cocoon-JS I've been using 2.0.4. without an issue until I start working seriously on the audio. I can playback audio file on android without a problem. But on iPad each files would play once and never plays again. I tried different files. wav, mp3, ogg. Nothing fixes the issue. Then I tried switching to 2.3.0 and problem solved regarding the audio playback. But but I'm experiencing performance drop on Andriod devices. >I tween the scale of a 1920*1080 sprite. It starts out huge then shrink down to fit screen size. In 2.0.4, the tween would run smoothly. In 2.3.0, the tween would be very sluggish. >The main game update function would starts before preload | create finishes. I have a sound that play at the end of create function. My expected outcome is the sound would play right as the game screen appears and I have a clock variable that counts the time. And these started while the screen is white - before the game render. gameTimer+=game.time.elapsed; // < this is in the update function. It should start from zero but it started before. So when I see the game it has already been underway. >And other general performance drop. *iPad is affected but not as much - not noticeable. **This is likely not sound related - since I have tried upgrading before and had the same issues I just went back to older version but now I need the audio. ***I could use 2.0.4 for android and 2.3.0 for iOs but there is a case where Alcatel Pop C9 can't install the 2.0.4 apk build [using cocoonjs] and the issue is solved by using 2.3.0 version. If I dig into the changelog I might find the answer but if anyone know the issue please help. Thanks :3 <3
  3. I think there's a bug in 2.0.6-7 I've been using 2.0.4; tried 2.0.6 Something happen to 'animation.frame' property once an animation completed playing. I debug the animation.frame. It works fine if I set loop to true in the play method. But when loop is set to false, once the animation complete the animation.frame throw an error "can't read property index of undefine.". I noted that other property ie. animation.isPlaying is still working. And once I restarted the animation the frame property comes back. I don't think that's the behavior you-we want. Since we might want to access the frame property when the animation isn't playing - I tested the animation.stop() method, it works fine. var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: preload, create: create, update: update ,render:render}); var anim; function preload() { game.load.atlasJSONHash('stunOne', 'img/stunOne/stunOne.png', 'img/stunOne/stunOne.json'); } function create() { var stunOne = game.add.sprite(400,400,'stunOne'); anim = stunOne.animations.add('stun'); anim.setFrame(0,true); anim.play(14); game.time.events.add(Phaser.Timer.SECOND*4,function(){ anim.play(14); },this); } function update() {} function render() { game.debug.text("animObject:" + anim.isPlaying, 32, 45); game.debug.text("frame:" + anim.frame, 32, 60); if(anim.isPlaying) { game.debug.text("frame:" + anim.frame, 32, 60); } }
  4. Summary: as lewster32 suggested. It's quite messy to tween particles to the point I want. The keyword here is the attractor. Proton is html 5 particle engine with attractor. https://github.com/flashhawk/spp.js This is another option. I make my random choice since both doesn't have documentation. There's this Proton example that draw on PIXI stage http://www.a-jie.cn/proton/example/render/custom/pixijs.html I edit the thing to work with Phaser. not perfect but works Tested working with cocoon js https://github.com/chusek/Proton-phaser/ my first time on github !.
  5. Finally got it, !!!!!!! Original Proton + PIXI renderer.onParticleCreated = function(particle) {var particleSprite = new PIXI.Sprite(particle.target); particle.sprite = particleSprite; pixiStage.addChild(particle.sprite);};// change into renderer.onParticleCreated = function(particle) { var particleSprite = game.add.sprite(0,0,particle.target); particle.sprite = particleSprite;};I notice it doesn't pool - recycle particle.
  6. I'm looking at the usual Phaser set up with game.stage.addChild(particle.sprite);replacing pixiStage.addChild(particle.sprite);but it doesn't work (undefine is not a function).
  7. So what I've got is Proton has its own renderer then it draw thing on canvas.... or in this case PIXI stage by pixiStage.addChild(particle.sprite); //particle.sprite was created by Proton now I have no idea how to do this in Phaser.
  8. Thanks,but now How do I use Proton with Phaser ?
  9. http://www.html5gamedevs.com/topic/5448-emitte-particles-from-one-point-to-another/ That post has a great solution only it uses explode. what I get is a lot of particles exploded and goes to the destination point. what I need is particle emitted continuously and going to the destination point one by one. Any idea ?
  10. That seems to be the case with the specific model or .. just this unit of Samsung Galaxy S4.
  11. This is on Samsung Galaxy S4 , Phaser 2.0.4 , Cocoon-JS 2 , Canvas+ At first, I thought it was the sprite. I tried adding game.add.sprite() then I also tried giving the sprite empty png. Then I tried removing background sprite(the rest are Graphics) the problem still persists. In webview+, it rendered fine.. and on Samsung Galaxy S2 canvas+ it works fine too..
×
×
  • Create New...