Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Saqirm last won the day on May 12 2020

Saqirm had the most liked content!

About Saqirm

  • Rank

Recent Profile Visitors

542 profile views
  1. @ivan.popelyshev Yeah, thanks for the explanation. I will use it with pixi-layers as i am using this lib for my game. Thanks for your instant reply. 🙂 Have a nice day
  2. Thanks alot ivan. I applied 2nd example, and it works very well. I am using layers library. I am abit aware of creating renderTexture each frame from polygon, is it faster than 2nd example ?
  3. Hello PIXIJS Devs. I am working on Line of Sight in PIXIJS. So far my algo works well. I ecountered on issue, that i can not draw polygon which makes a hole inside a rectangle. I tried to use mask and blend modes but it did not work. this._lightGraphics.clear() beginFill(0x000000, 0.5) drawRect(0, 0, this.viewport.width, this.viewport.height) endFill() closePath() beginHole() drawPolygon(points) closePath() endHole() I tried Graphics hole, it was working but not always, sometimes holes disapear for some reaso
  4. You can simply clear cache before adding new source to load.
  5. > Nope, no one did multi-texture ParticleRenderer, you can try it but its more heavy task What approach could be better in term of performance, create particleContainer for each emitter or create normal container which contains all Emitters? Container -> [ParticleContainers0 -> Emitter, ParticleContainer2 -> Emitter.....] Container -> [Emitter, Emitter, Emitter ]
  6. > Nope, no one did multi-texture ParticleRenderer, you can try it but its more heavy task I could but i have weak experiences in shaders etc.. Learning how rendering works in depth. 2. override this method of ParticleContainer, https://github.com/pixijs/pixi.js/blob/dev/packages/particles/src/ParticleRenderer.ts#L449 , see this "+alpha*255<<24" part? make it zero if sprite blendMode is ADD. I could possibly pass argument inside function which will ask emitter if it has blendMode setted to ADD or NORMAL.
  7. Yeah it is using 2 masks so probably one mask override the second one in particle container, this is why that particles looks different for a time. So this is probably not BlendMode issue. It explains the issue. Thanks. Is there a workaround to allow multiple textures? I am using same ParticleContainer which is grouping all particles / emitters in game. Particles could have own mask or multiple masks. It would be good, because PIXI-Particles supports BlendMode, option for ParticleContainer that allows you to change blend mode would be good. (like new ParticleContain
  8. Hello pixijs users & devs I encounter an issue using PIXI-Particles. For some reason my ParticleContainer changes blendMode for all particles if one of the particle is using MASK_0 (White mask taken from PIXI-Particle editor) 1. screen particles looks like BlendMode = BLEND_MODE.ADD, (explosion particle is causing it). public particleContainer: ParticleContainer = new ParticleContainer(2500, { position: true, vertices: true, uvs: true, tint: true }); ... Constructor: ... this.container = SceneManager.scene.particleNorma
  9. Thanks for your response. Yesterday i found hacky workaround by smoothing correction which works pretty well, atleast for some sort of testings It is just interpolate correction or in example it slows you down or speed you up to correct your position. It works well for low latency connections, not tested for higher. I will try to do, what you said. Thanks again
  10. I started a new project, a fast-paced online game (some sort of 2D MOBA). I encountered a problem with the part of netcode about client prediction & server reconciliation. Game Mechanics: 2D - Platformer (MOBA) Movement: WASD (jump / left / down / right) Abilites & Autoattack: J/K/L Architecture: Client/server (authoritative) My netcode is using these techniques: Client-side prediction & server reconciliation Server is sending position & data to the player, the player is replaying the last unprocessed inputs Client is sending input each fra
  11. @ivan.popelyshev Last 4 bites are: 1.-> Once right 1010 -> 6 2 -> Twice right 1100 -> 4 3 -> 3 times Right 0110 -> 2 4 -> Flipped Y 1000 -> 12 5 -> Flipped Y & Once right 1110 -> 14 6 -> Flipped Y & twice right 0100 -> 8 7 -> Flipped Y & 3times right 0010 -> 10 8 -> Flipped X 0100 -> 8 9 -> Flipped X & once Right 0010 -> 10 10 -> Flipped X & twice right 1000 -> 12 11 -> Flipped X & 3times right 1110 -> 14 32th bit => Flipped Y 31th bit => Flipped X 30th bit =>
  12. @ivan.popelyshev You're right i will re-write it
  13. @ivan.popelyshev This is my code for rotation, it might not be the best way to do it but it works. /** * rotate single tile * @param data - Tile Data Id ((Taken from JSON) */ private checkTileRotation(data:number):number { let rotation = 0; if (data & Env.FLIPPED_DIAGONALLY_FLAG) rotation += 4; if (data & Env.FLIPPED_VERTICALLY_FLAG && data & Env.FLIPPED_HORIZONTALLY_FLAG) rotation += 4; else { if (data & Env.FLIPPED_VERTICALLY_FLAG) rotati
  14. @ivan.popelyshev Well, I found plugin Tiled for pixijs, when i already did it by myself 😄 I also checked viewport plugin but id like to build my own, actually for my game i do not need anything complex. Viewport in 2D is just about pivoting and positioning of the main scene which is actually view. For 3D projection or 2.5d it is much harder. It is not very hard to make own viewport for 2d projection with full support. But there is lot of super cool plugins that i will definitely use like Pixi-Tilemap which is superfast and cool. I'm using it with tiled editor
  15. export class Camera { public static cameras:Camera[] = []; private _cameraFocus:any; public static activeCamera:Camera; private id:number = 0; private _pos:any = { x: 0, y: 0 } public zoom:number = 1; public canZoom:boolean = true; public zoomSpeed:number = 0; /** * Create a new camera for game * @param id - ID of Camera (Unique ID) * @param x - Position of camera * @param y - Position of Camera * @param scale - Scale of FOV (Zoom) * @param active - If camera is Active * @param follow - If camera
  • Create New...