bubamara

Members
  • Content Count

    182
  • Joined

  • Last visited

3 Followers

About bubamara

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.enea.sk
  • Twitter
    EneaGames

Profile Information

  • Gender
    Not Telling
  • Location
    Slovakia

Recent Profile Visitors

1,583 profile views
  1. bubamara

    Pixi.js Showcase

    I was comparing all 3 - dev, master & alpha
  2. bubamara

    Pixi.js Showcase

    @themoonrat it is pretty much expected Pixi to be a lot faster than Phaser2 and taking advantage over Phaser3 when it comes to sprite+graphics batching. But I'm seeing a huge slowdown with BitmapText rendering, while Phaser3 is rock solid at 60fps. 10000 instances, Pixi 3.0.11 - ~58FPS, 4.0.3 - ~43fps, 4.8.5 - ~40fps, 5.0.0-alpha.3 ~38fps Why is that? Is it caused by trade-off between raw performance and more complex batching (closer thing to real life usage) in v5?
  3. this is new stuff, you have to use Pixi v5.x
  4. bubamara

    performance issue, sprites with jumpy movement

    making them invisible is enough
  5. bubamara

    performance issue, sprites with jumpy movement

    no, create a poll of sprites with same texture and just reasign textue to what you need when it becomes visible
  6. bubamara

    performance issue, sprites with jumpy movement

    Usually you don't want to be creating and removing sprites in the main loop. Better would be to create pool of sprites ahead, making them invisible when they are not needed (theChild.visible = false) and visible again later on
  7. you can create individual textures from spritesheet by passing frame rectangle to PIXI.Texture constructor http://pixijs.download/dev/docs/PIXI.Texture.html
  8. bubamara

    Resizing Game Problem

    You're welcome. And if you want to go further, you can implement 'safe area', which is nicely explained here : http://www.williammalone.com/articles/html5-game-scaling/
  9. bubamara

    Resizing Game Problem

    @SamYan is this working for you? http://jsfiddle.net/om0hskfy/8/
  10. bubamara

    Question about resolution

    of course you dont want mobile devices to be rendering at resolution 4. I meant something like this : var resolution = Math.floor(window.devicePixelRatio ? window.devicePixelRatio : window.screen.deviceXDPI / window.screen.logicalXDPI) || 1; if (resolution > 2 || device.isDesktop) { resolution = 2; }
  11. bubamara

    Question about resolution

    1. yes, more pixels to draw 2. yes. for example you can read window.devicePixelRatio and set renderer's resolution accordingly, because there's a big probability that device with higher devicePixelRatio (and thus display resolution) needs more performant GPU. not sure about changing renderer's resolution on the fly, but I think safest way would be to destroy and recreate renderer
  12. bubamara

    Combining sprites into a single sprite

    you need to preload your textures first. paste this into pixi examples page var app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb}); document.body.appendChild(app.view); PIXI.loader .add('bunny', 'required/assets/basics/bunny.png') .add('head', 'required/assets/eggHead.png') .load(onAssetsLoaded); function onAssetsLoaded(loader, resources) { var container = new PIXI.Container(); var sprite1 = new PIXI.Sprite(resources.bunny.texture) var sprite2 = new PIXI.Sprite(resources.head.texture) sprite1.x = 0; sprite1.y = 0; sprite2.x = 32; sprite2.y = 0; container.addChild(sprite1); container.addChild(sprite2); var tex = app.renderer.generateTexture(container); var combinedSprite = new PIXI.Sprite(tex); app.stage.addChild(combinedSprite); } as jonforum suggested, see the tutorials together with pixi sources. may be WTF at the beginning, but will be same with other rendering engines/frameworks
  13. bubamara

    Combining sprites into a single sprite

    https://pixijs.io/examples/#/basics/render-texture.js
  14. bubamara

    Problem rendering web fonts

    hacky or not, if its working, dont scratch it why is it happening? no idea. yours example worked for me on firefox with no modifications to code, timeout was enough for chrome. guess its browser who decides
  15. bubamara

    Problem rendering web fonts

    @palanolho could you try it with doMagic() method as described here ? http://www.enea.sk/blog/preloading-web-font-pixi.js.html