Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 04/29/21 in Posts

  1. Zenext

    Pixi.js Showcase

    Hey guys. Shameless plug for a game I am working on - Mahjong Solitaire. Made with Pixi V6. It's a simple puzzle game so nothing crazy in terms of gameplay/graphics dev, but I've spent quite some time perfecting the scaling algo to adapt for all possible screen sizes.
    2 points
  2. > Also which method will be faster , to draw the lines or to load them as Sprites from image files ? I know the amount of operations is low here - only 10 lines , but in theory loading them from .png files looks to me the faster method. I dont think there's a difference on 10 lines
    2 points
  3. In javascript the scope of the function depends on how it's executed. For example if you have a class and you call it by myClass.foobar() then that is executed in the scope of the class. But if would do something like var func = myClass.foobar; func(); it would execute outside of the classes scope. Basically same thing happens when the event handler is run as you pass the info about the function only and not the scope. Old way of doing this was that you would do something like this: var that = this; function handler( ){ that.foobar(); } window.addEventListener("something", hand
    1 point
  4. or make canvas2d of pow2, draw image there, make texture out of it in pixi, enable mipmapping. Yes, this behaviour is default for ThreeJS, but pixi does like to force users to learn stuff
    1 point
  5. You cannot change anything inside graphics, you can just "clear" and refill it. However, there's a "tint" property. Make white rectangle, then change "tint" whenever you want. Alternatively, use Sprite with "Texture.WHITE" as texture, and tint it.
    1 point
  6. There's a demo for v5 too https://www.pixiplayground.com/#/edit/Ngi8fYSPwGGZYnfGIHb9O It was mentioned here: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#re-use-previous-frame-of-filtered-object for v6 you have to update the code a bit because filterSystem most probably was changed
    1 point
  7. Well, you have to update pixi-layers to latest, and it will spawn deprecation warnings anyway. Its not yet migrated to new plugin format , but it works Also, probably update viewport. 5.2 5.3 and 6.0 have serious changes for it, i dont know whether it was re-published already for latest v6 features. Theoretically, on v6, viewport should be much faster
    1 point
  8. @ivan.popelyshev Thanks! I use the following plugins (except pixi-tween): Most importantly, will upgrading to v6 improve performance? If so, then it's a must 😄
    1 point
  9. cuca

    Map world size question

    Hi, don't take anything in this message as written in stone. I never used Phaser, all I'm going to say is based on previous experiences I had. 1. Using engines or not, usually there's no standard for this, given that in games with big worlds there will be lots of implementations to process just what's near the place, reduce quality for far elements (in 3d mostly, with level of detail), for instance. 2. Definitely not. You could, if you want, but it's not as a "you should/must". Be free to make your world as giant as you want. 3. I'd suggest reading and learning more about
    1 point
  10. Here is a short example I wrote https://phaser.io/sandbox/edit/DuRpdEGQ This loop with check for distance is used to call the flutter action, try to make it more suitable for your use case bats.forEachAlive(function(bat){ if (game.physics.arcade.distanceBetween(player, bat) < 40 && !bat.fluttering) { bat.fluttering = true; flutter(bat); } }); Hope it helps
    1 point
  11. Why do you need multiple gsap threads? Also , that's how you use single RAF for both pixi and gsap: https://pixijs.io/examples/#/gsap3-interaction/gsap3-tick.js , and there are other examples. Please read them and then make question more understandable
    1 point
  12. The background is tile-based and made up of about 6 tiles at that zoom, and yes I'm using antialias but it's needed. Thanks a lot for the help, but I think I will pause the pixi version for now and try out something else.
    1 point
  13. I created a tool that allows direct engine to engine and version to version performance comparison: https://github.com/themoonrat/webgl-benchmark
    1 point
×
×
  • Create New...