All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Ok thx, will try the spritesheet loader thing, seems the more easy to understand, will post the solution if I find it.
  4. I see that @Exca helped, now i can "mipmap" is not a boolean anymore, you have to use "1" or "PIXI.MIPMAP_MODES.POW2" for it , make sure your atlas has size of power-of-two. Alternatively set it to "2" or "PIXI.MIPMAP_MODES.ON" - that'll enable it in webgl2 for textures of any size. "sprite.roundPixels=true" helps to prevent blur when you have "anchor=0.5" and odd width/height Mostly helps with text Text scaling can be a problem but you can ignore scale of parents with this trick: https://github.com/pixijs/pixi.js/wiki/v5-Hacks#ignore-parent-scale--rotation , and instead change the font size every time everything is scaled. Welcome tho the forums!
  5. Wanna see more things that can trigger the same feeling? https://github.com/pixijs/pixi.js/issues/6507
  6. In Parking Space your task is to drive a car and park it into marked parking area. Avoid driving off the road and complete the task within given time. Play Parking Space
  7. There's a few things that could help: - Changing the scaling mode to nearest from linear (good for pixel styled games). In this method you should scale in multipliers of 2 to keep pixels aligned. Looks really bad in nonpixel graphics style. - Using mipmap. Texture needs to be power of two and baseTexture.mipmap set to true. This might look better or worse. - Make sure sprite is on exact pixel coordinates. - Render the game in 1:1 pixel ratio and scale the canvas down instead of objects in renderer. - Create multiple sets of assets and select the one closest to wanted resolution (many spritesheet tools have automation for this). Propably some other things that could help that I cant remember just now.
  8. end3r

    Gamedev.js Jam 2020

    If you want to chat, join our (brand new) Discord server: https://discord.gg/URWvCwv
  9. What does THREEJS do here and how are they mixed?
  10. tsm

    Shader performances

    Thanks for the link, I will study that, I wasn't aware of premultiplied alpha, it's interesting (it is blewing my brain already đŸ˜„).
  11. Hello everybody, Please find the link and game details to our game published in play store and HTML5 also available. Please have a look and share your feedback. Looking forward to hear feedback ! Game distribution : Princess With the Christmas Eve round the corner, the excitement always is at the peak in the palace. The celebrations are round the corner with everyone gearing up towards it. Being a princess is even more fun. Let’s help the princess wear a cool party outfit for Christmas Eve and then you will need to help her with the dresses because this is the biggest event in the Palace. Last but not least, help her decorate her Christmas tree with a majestic look Get it on Google play : https://play.google.com/store/apps/details?id=com.CuteDressUp.PrincessTrendyTshirt&hl Play on web : https://cutedressup.com/princess-trendy-t-shirt/
  12. I'm starting out using Pixi.js for a game project. But how on earth do you make sprites look decent when they are scaled down? Out of the box sprites only look good at their native size, it's acceptable they look crappy when scaled up, but when scaled down I'd like them to still look pretty decent. Someone out there must have fixed this issue, otherwise how could you make a decent looking game. In a game the scaling of sprites needs to be possible for animations etc. What's the common practice here? My project is setup such that a container is always scaled according to window size, so smaller window - smaller container, so the ui layout stays the same no matter the device resolution. Attached is a simple example project if I was not clear in the text. Any help is appreciated! Take care! render_fix_project.zip
  13. Yesterday
  14. This is specific to 2d graphics, and yes, it blew up brains of many people who studied it. I love those kind of issues when people are beating themselves on glass doors that I too didn't notice before I feel happy each time someone else gets it too.
  15. Its premultiplied alpha. We store not R,G,B but Ra,Ga,Ba. Blendmode has coefficients (1, 1-src_alpha), not (src_alpha, 1-src_alpha). So, (R,G,B,0) is actually additive color, it just adds a value to each channel. If we dont store it like that, we'll get huge problems with linear filtering. http://www.adriancourreges.com/blog/2017/05/09/beware-of-transparent-pixels/ Welcome to 2d graphics To fix the thing either premultiply vColor.rgb to color.a , either divide by alpha and multiply by it in the end.
  16. tsm

    Shader performances

    Ok never mind, multiplying my tint color with texture color.alpha is working like you did on your exemple. The code : https://www.pixiplayground.com/#/edit/v1ul6FO1tA5b9R4pQTf30 I still don't understand why gl_FragColor = vec4( textureColor.rgb, 0.0) is showing some pixels, but I'm not experimented with shader. Thanks a lot Ivan !
  17. tsm

    Shader performances

    Sorry Ivan, I was doing some tests on pixiplayground and wrong code has been saved. This is the code I was talking about : https://www.pixiplayground.com/#/edit/kEz5EE6EnJtA-gWPw1O8B I don't understand why the alpha parameter (color.a) has no impact. Even if I set it to 0.0, I still see some pixels.
  18. I dont understtand what exactly do you want with alpha channel, but I can deduce by your shader code: Yes, you assume that `color.rgb` is not premultiplied. In fact, its RGB channels already multiplied by alpha. So , either you divide by alpha, then ultiplying whole result by alpha, or you just add " * color.a" for vColor: https://www.pixiplayground.com/#/edit/kv--XY25TNraHlDlA_Q3r Here is example of how to deal with premultiplied alpha: https://github.com/pixijs/pixi-picture/blob/master/src/OverlayShader.ts#L18 1. if 0 , return 0 2. if not 0, divide by alpha, do your things 3. dont forget to multiply by alpha in the end. If that is not enough, please explain my what are you trying to do and how should it look, becausse right now both mine and your examples look same
  19. I'd like to create a function and be able to call it in another function. this one specifically function coins(coin) { coin.setBounce(1); coin.body.setGravityY(300); this.physics.add.collider(coin, platforms); this.physics.add.collider(player, coin, collectCoin, null, this); coin.setVelocityX(60); coin.setVelocityY(-300); coin.setCollideWorldBounds(true); } That way every time the coin is created I can call the function for the coin's physics.
  20. That is how you move the camera, but you have to have given it a bounds first, otherwise it has no-where to go! game.world.setBounds(0, 0, 2000, 2000);
  21. tsm

    Shader performances

    Hi Ivan, hope you are doing well. I'm struggling with the shader in the batcher you help me build : https://www.pixiplayground.com/#/edit/U3Sk72dkfAG0ZjriNxE4r My alpha channel isn't working correcltly, even with 0.0 instead of color.a line 14, I can't get the correct transpancy. Even with vec4(1.0, 0.0, 0.0, 0.0) I have red with no transparancy at all. Do you see where's my error ? Thanks.
  22. I have tried to move the camera manually by doing game.camera.x += 1; in the console in Chrome and Edge on both a Chromebook and PC. I can't get the camera to move at all. I am using Phaser CE. Here is my code: var hub = { create: function(){ if(game.mode == "vga"){ game.stage.backgroundColor = "#3d8bff"; } top = game.add.sprite(-256, 0, 'top'); bottom = game.add.sprite(0, 448, 'bottom'); game.movement = "hold"; holdTimer = 4; holdStage = 0; stone = game.add.sprite(0, 0, 'stone'); hand = game.add.sprite(344, 354, 'hand'); }, update: function(){ if(game.movement == "hold"){ holdTimer -= 1; if(holdTimer == 0){ if(holdStage == 0){ stone.x = 276; stone.y = 282; hand.frame = 0; holdStage += 1; } else if(holdStage == 1){ stone.x = 280; stone.y = 304; hand.frame = 1; holdStage += 1; } else if(holdStage == 2){ stone.x = 272; stone.y = 320; hand.frame = 2; holdStage += 1; } else if(holdStage == 3){ stone.x = 252; stone.y = 340; hand.frame = 3; holdStage += 1; } else if(holdStage == 4){ stone.x = 236; stone.y = 366; hand.frame = 4; holdStage += 1; } else if(holdStage == 5){ stone.x = 252; stone.y = 340; hand.frame = 3; holdStage += 1; } else if(holdStage == 6){ stone.x = 272; stone.y = 320; hand.frame = 2; holdStage += 1; } else if(holdStage == 7){ stone.x = 280; stone.y = 304; hand.frame = 1; holdStage = 0; } holdTimer = 4; } } }, }; Is anyone else experiencing this problem with Phaser CE and how do you remedy it?
  23. Okay thanks, I need to convert all my images to the sRGB color profile.
  24. Spine plugin is a very difficult thing if you aren't ready to debug it yourself, usually I can guess what is the problem but not in your case. Just give something to work with
  25. Hey Larry! Do you remember how you were able to fix it? I am having this issue too with a site deployed here: https://everybodycodes.github.io/Phaser-Fish-Game/ It's looking for the loaded files at the wrong location and not including the "Phaser-Fish-Game/" directory in the path... I think there needs to be some flag to pass into the `phaser-scripts build` command, but sadly I don't see one... đŸ˜¢ I would really be a bad developer experience if you are forced to manually go through and modify every file path mention in the build folder again each time you make a build! I also opened an issue about this here: https://github.com/photonstorm/phaser/issues/5083 And I asked about this on the phaser forums too: https://phaser.discourse.group/t/errors-when-trying-to-host-on-gh-pages/5832
  26. Hello! somethign-something color profiles, some images cant be uploaded to webgl properly. You have to save your image with other color profile. There's no actual info about that, sorry.
  27. Hello Everyone, I have an issue with chrome (version >=80). I don't know why, but the color of my images are washed out.On the left an img tag and on the right a pixi sprite. Reproduction : https://codepen.io/Anthelmed/pen/qBOWwXM Do you have an idea why?
  1. Load more activity