All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. ponponboy

    gltf and oimo physics, strange movement

    Thank you Wingnut! I have never try CannonJS! I will try to use CannonJS this time ;D
  4. I guess the question now is whether this is the desired behavior or not. I bet it's an easy fix if not, as you can just use the global position of the camera in place of the values its using. Hopefully we can get Deltakosh or someone else who can change the source code to see this and take a look.
  5. s4m_ur4i

    Exclude graphics from Camera Shake

    Personally, I found that using multiple scenes is a lot more comfortable for many things, like UI elements etc. because it can get messy if your game gets bigger. It kind of sorts it. And also is not affected by the camera of the other screen - as Rich already pointed out. The only thing is, that you have to get sure the new scene (if your game is bigger than the view) is aligned with the underlying scene.
  6. s4m_ur4i

    How to align game in webpage

    add "rel=stylesheet" to your <link> element. Get sure that the path to your CSS-File is correct. The CSS seems not to be loaded as of the background of the text-boxes should be black. also: I think you need to give your canvas an ID and put it in the phaser game config, not sure about that, since I never used it that way. Maybe someone else can clarify. and add this to your CSS to get rid of browser defaults * { margin: 0; padding: 0; outline: none; text-decoration: none; border: 0; }
  7. s4m_ur4i

    How to tween scale in Phaser 3

    this.scene.tweens.add({ targets : this , scale : 10 ease : 'Linear', duration : 500, }); You can simplify it. targets only needs to be an array if it's multiple targets. scale: 10 does both X&Y yoyo default is false, as 0 of repeat and callbackScope is this.
  8. alextewpin

    Can't figure out how to use filters

    @ivan.popelyshev thank you, but all suggested solutions didn't worked. Mipmaps didn't affected anything, proper scaleMode is already set. Not sure what are you trying to achieve here. There should be no point in flipping Y axis, because palette is 1px tall. I'm pretty sure wrong coord is the problem, because if I changing Y coord colors are changed too, which shouldn't be the case with 4x1 texture. I'll provide online demo tomorrow.
  9. Saltallica

    Caching output of sprite with filter applied

    Ivan, Thanks for the quick reply! I'm using v4 (4.6.2). Wrapping the sprite into a container, and applying the filter to either the sprite or the container, with the container.cacheAsBitmap = true causes it to disappear completely. Also tried playing with render.generateTexture and also getting the same results - as in nothing displays. Only other thing I can think to do at this point is extract the image, and re add it as a new texture, but not sure if that'll work either.
  10. ourvice

    shader toy to pixie

    Hiya! I was wondering f there are any tricks to modifying this shader toy snippet to work in pixie filter... https://www.shadertoy.com/view/4s2GRR //Inspired by http://stackoverflow.com/questions/6030814/add-fisheye-effect-to-images-at-runtime-using-opengl-es void mainImage( out vec4 fragColor, in vec2 fragCoord )//Drag mouse over rendering area { vec2 p = fragCoord.xy / iResolution.x;//normalized coords with some cheat //(assume 1:1 prop) float prop = iResolution.x / iResolution.y;//screen proroption vec2 m = vec2(0.5, 0.5 / prop);//center coords vec2 d = p - m;//vector from center to current fragment float r = sqrt(dot(d, d)); // distance of pixel from center float power = ( 2.0 * 3.141592 / (2.0 * sqrt(dot(m, m))) ) * (iMouse.x / iResolution.x - 0.5);//amount of effect float bind;//radius of 1:1 effect if (power > 0.0) bind = sqrt(dot(m, m));//stick to corners else {if (prop < 1.0) bind = m.x; else bind = m.y;}//stick to borders //Weird formulas vec2 uv; if (power > 0.0)//fisheye uv = m + normalize(d) * tan(r * power) * bind / tan( bind * power); else if (power < 0.0)//antifisheye uv = m + normalize(d) * atan(r * -power * 10.0) * bind / atan(-power * bind * 10.0); else uv = p;//no effect for power = 1.0 vec3 col = texture(iChannel0, vec2(uv.x, -uv.y * prop)).xyz;//Second part of cheat //for round effect, not elliptical fragColor = vec4(col, 1.0); }
  11. Yesterday
  12. ivan.popelyshev

    Can't figure out how to use filters

    > It's kinda works, but colors are mangled. I believe the reason it wrong texture coords. I've already read everything I could find here and on Github, but still can't figure it out. Disable mipmap on palette baseTexture. If something else is wrong, try "color.r + 0.5 / 256.0" where 256 is height of your texture. Also disable linear filtering for texture in uPalette (scaleMode in baseTexture should be PIXI.SCALE_MODES.NEAREST) > How Pixi determines main uniform texture name? It look like I can give it any name and it's just works. It doesn't . It binds input texture to location 0, and uSampler is 0 by default.
  13. ivan.popelyshev

    an efficient way to have large grid background

    > You can draw 1 tileable graphics object to a RenderTexture and use that in a TileSprite. Which will use TilingSprite shader which might be slow for fullscreen cases on old graphic card. Of course, in case of pow2 texture with wrapMode=repeat it will omit that"%" operator and everything will be fine.
  14. ivan.popelyshev

    Performance issue with alpha transition off sprite

    > I assume the issue is that the first time a sprite with a specific alpha is rendered, it needs to calculated and is than buffered No. It shouldn't slow down in both 2d/webgl contexts. Search what is wrong with your browser, videodrivers, operating system, hardware. However, if initial alpha is 0, pixi wouldn't want to render it. When you render something first time, of course there's a lag, please search for "TextureManager.updateTexture" or "prepare plugin" in pixijs issues on github or in this subforum. Its all about the decoding PNG/JPED into RGBA format and uploading it in videobuffer. "renderer.textureManager.updateTexture(myTexture)" should do the trick.
  15. ivan.popelyshev

    Caching output of sprite with filter applied

    >I also tried rendering the sprite (with filter) to a renderTexture, then outputting that to a sprite. The sprite shows up, but the affects of the filter do not show up. Put that sprite into container, and cache container. Sometimes filters dont work directly.. \Are you using v4 or v5? v5-alpha.3 has a problem with filters in renderTexture
  16. Hi everyone, first post here, but quite an active reader. I'm working with PIXI.js for about a year. Right now I have the issue that the framerate of my game drop drastically when I fade in a sprite as a screen overlay. What I do: The game consists of multiple layers (PIXI.Container), the layer on top is used as overlay and contains a sprite. When the player takes damage, this sprites alpha is tweened from 0 to 1 within a second. What's the problem: The first time this tween/transition happens, the FPS of the game drop harshly (on my windows test system from stable 60 fps to about 12 or even less fps). The second time the transition happens, everythings runs silky smooth. What I tried: Replace usage of PIXI.Sprite.alpha with a PIXI.filter.AlphaFilter. But the effect remains exactly the same. I assume the issue is that the first time a sprite with a specific alpha is rendered, it needs to calculated and is than buffered. If that's the case, I have two questions: Does this buffer remain until the page is reloaded? And how could I fill this buffer before the game starts? If there's no buffering or my whole approach is faulty, I would be very grateful for improvement suggestions.
  17. Dad72

    3d positioning

    I'm not sure I understand. You can define a vector3 position? It is very simple : mesh.position = new BABYLON.Vector3(5, 1.0, 12); You can get a position with : var positionVector3 = mesh.position.clone(); var positionX = mesh.position.x;
  18. dude78

    Click in the center

    Or check coords when click events is called.
  19. Hey Guys, Running in to a scenario where I'm using an expensive shader applied to a large background sprite. The background doesn't get updated once the shader is applied, and it would be great if I could just get a copy of the sprite as it looks with the shader applied, without it having to re apply the shader every frame. My failed attempts so far: The most straight forward approach was to attempt using cacheAsBitmap, but it simply makes the entire contents of the container disappear. I also tried rendering the sprite (with filter) to a renderTexture, then outputting that to a sprite. The sprite shows up, but the affects of the filter do not show up. Does anyone have any tricks up their sleeves? Thanks!
  20. http://www.mattiesgames.com/galaxius/ A simple strategy created in a few days. Development log http://concavetales.com/exercises/?page=4552
  21. makalu

    How to tween scale in Phaser 3

    Just figured it out, using scaleX and scaleY... this.scene.tweens.add({ targets : [ this ], scaleX: 10, scaleY: 10, ease : 'Linear', duration : duration, yoyo : false, repeat : 0, callbackScope : this });
  22. makalu

    How to tween scale in Phaser 3

    In Phaser 2 we could tween scale like in the topic linked below. How is this done in Phaser 3? It looks like the sprite Scale property has changed to scaleX and scaleY, which I thought maybe I could tween like this, but this didn't seem to work: this.scene.tweens.add({ targets : [ this.scaleX, this.scaleY ], x: 10, y: 10, ease : 'Linear', duration : duration, yoyo : false, repeat : 0, callbackScope : this });
  23. @mhcdotcomglad they helped wew, finally done with the menu. get it while it's hot!
  24. I'm a publisher and having games that I distribute also by GD. I can confirm that in the last 6 month you need to approach them to get the payment - but at least you get, and their minimum payment is low, not like others who can say minimum $500 About eCPM - it dropped. since the beginning of the year it really dropped. on my website BIBIB.net I used to have 0.13 CPC (EURO) and it dropped like hell. I also see it with the games I distribute on other websites. I can't point on the reason, ADS.TXT or Google taking too much control on the market, maybe drop of value in the entire industry. Don't know. But I've heard about it from some publishers and developers.
  25. Well Judge for yourself 3 dollars per month is not too much but maybe they changed the api or sth or Im doing something wrong But I see their ads in my game and all they give is about 3$ per month this is ridiculous Maybe i am doing something wrong and you will have more luck I am just honestly telling my case
  26. Joshua Red

    Opposite event of onColide

    Hi I'm trying to make a FPS game and right now I to make climbing up ladders possible. What I do is say onCollide move the camera up a bit but gravity pushes it down again so I disable gravity when you move up like this: camera.onCollide = function(collidedMesh) { if (collidedMesh.id === 'ladder') { camera.applyGravity = false; camera.position.y += 0.02; } }; But then I have to turn on gravity on again afterward. So when it stops colliding I enable gravity again, but I'm not sure what event I can use. Do you guys know of anything I can try?
  27. Hey Prozi Last time you said that you will continue using them. For now you suggest not to deal with them? I just planned to upload more games on their portal... 😪 Maybe the payment decrease occur after them stop featuring games on some of categories... What about impressions/gameplay ratio etc?
  28. alextewpin

    Can't figure out how to use filters

    My goal is to make palette-applying filter. I have grayscale sprite where colors are set on equal distances (eg. 0, 0.33, 0.66, 1) and palette as 4x1 pixel texture. Idea is taking red channel from sprite and using it as x coord on palette texture. I've made this with Unity some time before no problem. All of my sprites and palettes are placed on spritesheets. Problem is I can't get proper coords in shader. If I use default shader, everything works fine, sprites renders as is. gl_FragColor = texture2D(uTexture, vTextureCoord); Now with my shader: uniform sampler2D uTexture; uniform sampler2D uPalette; varying vec2 vTextureCoord; void main() { vec4 color = texture2D(uTexture, vTextureCoord); gl_FragColor = texture2D(uPalette, vec2(color.r, 0.5)); } It's kinda works, but colors are mangled. I believe the reason it wrong texture coords. I've already read everything I could find here and on Github, but still can't figure it out. Extra question 1 How Pixi determines main uniform texture name? It look like I can give it any name and it's just works. Extra question 2 Why gl_FragColor = texture2D(uTexture, vTextureCoord); works just fine, but if I pass exact same texture in uniform param it renders the whole spritesheet in a weird way?
  1. Load more activity