ivan.popelyshev

Members
  • Content count

    1,117
  • Joined

  • Last visited

  • Days Won

    1

ivan.popelyshev last won the day on August 17 2016

ivan.popelyshev had the most liked content!

1 Follower

About ivan.popelyshev

  • Rank
    Advanced Member
  • Birthday

Contact Methods

  • Website URL
    https://gameofbombs.com/
  • Twitter
    https://twitter.com/ivanpopelyshev

Profile Information

  • Gender
    Male
  • Location
    Moscow, Russia
  • Interests
    Pixi.js, Topcoder, Codeforces, ninjas and bombers

Recent Profile Visitors

2,072 profile views
  1. Nothing , I just want it to be more clear. "i" isn't used inside the block, so I moved everything else to separate function
  2. With a filter, stage is rendered to separate framebuffer. Then framebuffer is rendered into actual canvas. Mask works the same way, but it has to render mask in second framebuffer and combine it with AlphaMaskShader, that's why its less performant. Rectangle mask is a special case, its using "gl.scissor" which doesn't eat extra power at all and doesn't disable antialiasing. Filters are very useful, sometimes i use VoidFilter on whole stage just to enable some advanced stuff inside it Its like a "layer". For example, you can wrap multiple objects in that filter and then specify blending for whole layer, its useful for lighting: http://pixijs.github.io/examples/#/layers/lighting.js
  3. If you are writing for PC and you have less than 10k sprites, its better to use plain Container. For some critical cases, there are plugins: https://github.com/pixijs/pixi-tilemap , and ParticleContainer.
  4. Yep. Some libraries cant be added to bundle. But for pixi-spine we somehow made it
  5. I think its better to remove "renderable" and "cacheAsBitmap" there. That way mask will be drawn with "gl.scissor" and that's the fastest you can get. One more way, but coords are in screen, not in world. app.stage.filters = [new PIXI.filters.VoidFilter()] app.stage.filterArea = new PIXI.Rectangle(minX, minY, maxX, maxY) //<-- its SCREEN coords,you have to calculate the part of screen that must be drawn. One more way is to add big rectangles on edges, and I think it'll be good too.
  6. @philipshanson I'm glad that it worked for you
  7. Better ask that in "issues" of that repo. @bigtimebuddy is managing it. I assure you, that problem is solvable We have even harder setup in pixi-spine, with demos of how to use it with npm, browserify and webpack.
  8. that's an absolute link? I don't know the structure of your app in web server, try relative link? var grid1_texture = new PIXI.Texture.fromImage("resources/whiteSquare.jpg");
  9. @philipshanson i told you possible solutions. You are over-complicating things, don't go there. But if you go there, please don't take me with you.
  10. We don't use SO much, I'll create issue in github later.
  11. I recommend to try add your stuff to "app.ticker" instead. But I don't think it will affect much But network and game updates, are you sure we need 60FPS network? Update of sprite coords and update of game state are two different things, one must be at 60FPS for good animation but the other will be better on 10-20FPS, like most of multiplayer browser games. Linear interpolation helps a lot So , in 8.5 seconds time, 2.25 spend on UI (divs and such, "program"), and 1.1 on js updates and render. That's not bad at all! Just remember that 100% are all spent CPU resources, it doesnt include "idle" time. The more idle time, the better Percents are there only to determine which part is worse than others.
  12. How big is your time interval? How many seconds is the "idle time" in that list? Yeah. Ticker creates its own RAF. Your app is using it. Where do you call requestAnimationFrame manually?
  13. And I believe that 100 CanvasRenderer's will work too. Just use only one ticker for them. For that kind of task i even could use pure canvas2d api, its not that big problem
  14. As I said, you can use one big canvas that lies underneath your HTML, just make your div container transparent
  15. How did you notice it? Its actually the same requestAnimationFrame , no need to rewrite it. Also, 10% is of all the app time, not of the CPU time?