Kristiyan

Members
  • Content Count

    21
  • Joined

  • Last visited


Reputation Activity

  1. Thanks
    Kristiyan reacted to rje in Viewing number of draw calls webgl   
    https://spector.babylonjs.com/
  2. Like
    Kristiyan reacted to s4m_ur4i in Game works better in Canvas than in WebGL   
    I now that WebGL is teased at the highend, fast rendering stuff.. but it really isn't at least for the usecase of pixelgraphics.
    WebGL is fast in doing calculations and stuff, drawing shapes. But rendering Pixelgraphics is different.

    With that said at first. If you are writing a game that supports average PCs / Mac / Linux you should consider droppping WebGL and using Canvas.
    (I am only talking about desktops here, mobile is different but the webGL support is also still lacking)

    WebGL is pretty slow compared to Canvas when using phaser (not due to phaser, due to using what it is for).
    This can also seen on every integrated graphics, which most non-gaming-pc people have. At least the Iris Pro 550 / 580 (fastes yet, 580 is scored higher than a dedicated Geforce 940M) are still performing a lot better in Canvas then in WebGL. This can also be seen on the latest 620 series ob intel kaby lake.
    Most machines use an integrated solution especially in asian countries. (older ones).

    WebGL 2.0 is behind the corner with full support in Microsoft Edge and via flag on Chromium. I don't investigated tests on this.
    So if you are looking for a solution that most people can play - Canvas is the way to go.
    You are loosing the nice filters, but if they are not essential; drop 'em.

    WebGL has huge potential and it would be great to see the performance every one talks about. But you have to focus on real numbers and on average System-
    running an i5 / i7 with HD 6000; HD500; Iris 500; HD 600 - Canvas is up to 30% faster. (System were actually tested).

    Please notice: I am looking on overall OS not only Windows. 


    regards
  3. Like
    Kristiyan reacted to icp in WebGL renderer for android devices causes bad performance   
    Generally, WebGL is faster than Canvas but in your case I don't think you have to worry about that.
  4. Like
    Kristiyan got a reaction from ivan.popelyshev in pixi pointerevent currentTarget = null ?   
    I agree! Thank you @ivan.popelyshev ,always competent answers 👌
  5. Like
    Kristiyan reacted to ivan.popelyshev in pixi pointerevent currentTarget = null ?   
    we reuse that object, and console actually shows it contents a bit later.
    You can be sure only about link itself, not about contents, someone could already change them.
  6. Like
    Kristiyan reacted to icp in WebGL renderer for android devices causes bad performance   
    You can set Canvas as default renderer since it is supported on all Android and iOS devices.
  7. Like
    Kristiyan reacted to ivan.popelyshev in pixi pointerevent currentTarget = null ?   
    maybe you used console.log(event), in that case there's some kind of async logic there
  8. Like
    Kristiyan got a reaction from ivan.popelyshev in pixi pointerevent currentTarget = null ?   
    Hello everyone!
    I have pointerover event and i want to get the element i point on (hover on).But when i use event.currentTarget , it is null,also  tried with event.target which is also null. Any suggestions ?
    sprite.on('pointerover',function(event){console.log(event.target,event.currentTarget)}); // target and currentTarget are null  
  9. Like
    Kristiyan reacted to ivan.popelyshev in Place Sprite Over All Other Sprites?   
    There're simple ways like
    class DContainer extends Container { addChildZ(container, zOrder) { container.zOrder = zOrder || 0; container.arrivalOrder = this.children.length; this.addChild(container); this.sortChildren(); } sortChildren() { const _children = this.children; let len = _children.length, i, j, tmp; for (i = 1; i < len; i++) { tmp = _children[i]; j = i - 1; while (j >= 0) { if (tmp.zOrder < _children[j].zOrder) { _children[j + 1] = _children[j]; } else if (tmp.zOrder === _children[j].zOrder && tmp.arrivalOrder < _children[j].arrivalOrder) { _children[j + 1] = _children[j]; } else { break; } j--; } _children[j + 1] = tmp; } }; } If you need sort inside the container, use it.
    If you need to move one element, just swap it with last element in container, there's swapChildren or something like that in docs. Or remove/add it again.
    If you need sort through the tree, use pixi-display, I recommend latest version: https://github.com/pixijs/pixi-display/tree/layers , its called "pixi-layers" instead.
    That's why I like gradual approach - choose the solution that corresponds to the scale of your problem. No one will call you stupid if you use just simple things for simple problems  There are people who think "why dont you use complex solution like webpack, too stupid for it?" but seriously, just ignore them.
  10. Like
    Kristiyan reacted to Exca in PIXI - many filters cause fps drop   
    Depending on filters and the area they are applied to it they can be really expensive. What kind of filter you have?
  11. Like
    Kristiyan reacted to jonforum in PIXI - many filters cause fps drop   
    yes glow filters are very bad 
    huge cpu computing

    You can maybe try to create a new cache textures with your [sprites+filters], it a solution if you not need to anime the grow filters.
    ~~ 18% cpu on the pixi filter demo
  12. Like
    Kristiyan reacted to ivan.popelyshev in PIXI - many filters cause fps drop   
    Pre-render glow in photoshop, add sprites instead of filters.