• Content count

  • Joined

  • Last visited

About bQvle

  • Rank
  • Birthday 08/28/1986

Profile Information

  • Gender
  • Location

Recent Profile Visitors

539 profile views
  1. Parsing text and inserting images

    Hello This is a planned feature for dynamic text in Pixi-ui. however it's not there yet. Its impossible to do with regular PIXI.Text. maybe you can use a BitmapText with a "custom" spritesheet. @ivan.popelyshev the emojis it shows now is just default emojis from the system font (
  2. Drag and drop without frame lag

    Hi radevus, You can do something like this. (I made this for for an editor Im working on) it covers: click, rightclick, middleclick, down, rightdown, middledown, up, rightup, middleup, drag, dragend, dragstart, rightdrag, rightdragend, rightdragstart, middledrag, middledragend, middledragstart, over and out. You need to change the "scene.mousePos" parts to another representation of mouseposition. (maybe "") And for "_lastPosition: new Point()" you would need to use "new PIXI.Point()" (I'm using my own point class). Use it like this var Button = PIXI.Sprite.fromImage('...'); MouseEvents.init(Button); { //... }); or.. var Box = PIXI.Sprite.fromImage('...'); MouseEvents.init(Box); Box.mouse.dragstart(function() { //... }); Box.mouse.drag(function() { //... }); Box.mouse.dragend(function() { //... });
  3. Great performance in V4

    Just want to put out our experience. (since there was a post with a different experience). We are developing a browser multiplayer game. and in v3 it was barely playable on regular laptops and office-pc's without "resonable" graphics cards. V4 actually doubled the performance of those lower-end devices, so when they would be running 30-40 fps, they are now pulling 80 fps which is more than the requred 60 to get the soft feel. I read that you improved the performance on mobile devices, and i wished it would have the same effect on lower end pc's. and it did! This is really important to us, because our game is probertly going to be played mostly from school computers, laptops etc. so thank you!. But, there's still alot of bugs, and I will keep reporting them on github, when i find simpler ways to reproduce them.
  4. Multiple WebGL Canvases

    Also WebGL? Its funny, becasue when I testet it before, one of the WebGL canvases would crash instantly, without even using the second WebGL renderer. But maybe i did something wrong back then. Anyways I'm really happy it works now, that just saved me alot of "ugly"
  5. Multiple WebGL Canvases

    Hi, I know this didn't work earlier, I've had my fights trying to figure out how to work around this. Today I had another fight, and out of pure desperation i tried to instantiate multiple webGL canvases, and guess what, it worked. (flawless). I can't find anything official about this in the changelogs? Is this an fortune side-effect of 3.0.9? should i still be cautious?
  6. DisplacementFilter padding

    Just wanted to let you know that the problem is gone. I had to make the background-color of my Displacement Filter texture #808080 (i dont know why, but maybe it should be written somewhere) if i change the background color to black, The padding will be back.
  7. DisplacementFilter padding

    its okay, not like its stopping me ill check back later!
  8. DisplacementFilter padding

    @xerver , have you had any time to look at this?
  9. DisplacementFilter padding

    Yes, sorry for the delay.. here is the codepen (click the background) Here is a version where I animate the Displacement scale aswell, it shows the impact on the borderpadding nicely Ill make a github bug aswell. Edit: Github:
  10. DisplacementFilter padding

    Hi xerver, Its intentionally not power of two, if i make it power of two the effect will Tile to the entire screen, i only want the shockwave to occur at a fixed location. but it still causes this border on my stage container, the border appears the second the filter is applied, and the border size changes with filter scale.
  11. DisplacementFilter padding

    Yeah, I know how it looks when a single texture clamps, but this is a filter applied to my "stage" container. Just a donut-shaped displacement map to illustrate kind of a shockwave effect. All the elements you see in the picture is different textures (plane, tank, ground).
  12. DisplacementFilter padding

    Hi, I'm trying to utialize filters to create visual-effects in my game. But when I apply the filters to my stage, It offsets the entire picture, and streatches the border pixels. The effect plays as expected. It looks like this (This is with displacementFilter.scale 200): Any ideas why this is happending?
  13. Best practice for this scenario

    I'm still having some issues i need to solve here. Currently I've succeeded creating the fully customizable viechle. //Container var body = new PIXI.Container(); //Sprites var bodyMask = PIXI.Sprite.fromImage('Sprites/Tank/body1/mask.png'); var bodyShader = PIXI.Sprite.fromFrame('Tank/body1/shader.png'); var bodyPattern = new PIXI.extras.TilingSprite(...); bodyMask.anchor.set(0.5, 0.5); bodyShader.anchor.set(0.5, 0.5); //Fill and pattern var bodyFill = new PIXI.Container(); bodyPattern.tint = ....; bodyFill.mask = bodyMask; bodyFill.addChild(bodyPattern); //Stickers for (var i = 0; i < [stickercount]; i++) { var sticker = PIXI.Sprite.fromFrame(....); sticker.anchor.set(0.5); sticker.scale.set(...); sticker.x = ...; sticker.y = ...; bodyFill.addChild(sticker); } //Combine body.addChild(bodyFill); body.addChild(bodyShader); body.cacheAsBitmap = true; And I'm doing the same for the Gun. this bumped me up from 3-5 drawcalls to ~200 drawcalls, and it was REALLY killing the browser to a point where i couldn't even close it. I solved that by setting it to cacheAsBitmap. That reduced my drawcalls to around 65. (2 drawcall for each player + level and gui). And its perfoming allright on my PC. But I want it to preform great, and also on mobile devices. So i thought that instead of caching as bitmap, I wanted to render it to another canvas, and use that as a spritesheet. But that brings me several problems! and I hope someone can help me. 1. I can't use a WebGL canvas, since pixi only works with one WebGL canvas. 2. Using a normal canvasRenderer gives me several other problems. - Nothing is getting tint colored. - The fill (bodyPattern/tilingSprite) isn't tiling. - The mask isn't working = resulting in a black and white collage of sprites that isn't masked. Any good workarounds here? Thanks Edit I'm currently trying to make the spritesheet with a render texture. but everytime i call RenderTexture.resize, it clears the whole texture. I cant figure out why.
  14. game blurred in a retina ipad

    My guess is that it isn't using the correct pixel ratio for the device. You should get the device ratio with this function var PIXEL_RATIO = (function () { var ctx = document.createElement("canvas").getContext("2d"), dpr = window.devicePixelRatio || 1, bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; return dpr / bsr; })(); And then apply it to the renderer.context ratio = PIXEL_RATIO; renderer.context.setTransform(ratio, 0, 0, ratio, 0 ,0);
  15. Best practice for this scenario

    Thanks for answering guys I guess I will try both and see what works best. Regarding the stickers, I'm thinking of putting them all in one container, and the do the masking on the container. But isn't the mask recalculated each frame? > Not sure what you mean by "smart", you would just have to update the gun every frame to match the location of the other object. If the gun needs to sit at the front-left of the body, i could offset that using pivot. but that wont work, since the gun needs to rotate around itself. The best/"smartest" solution i can think of is just to make a Child container on the body where the gun is supposed to be positioned, and then update the "sibling/gun" to inherit that container's world position. But is it okay to use empty containers for positional references?