• Content count

  • Joined

  • Last visited

About the-simian

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. the-simian

    Phaser 3 debug property in physics not drawing debug layer

    So sorry samme, I left that out. In the create method I also have create the map and the debugGraphics: The debugGraphics draws on top of my tilemap, and it indicates the parts you can collide with. It seems to be working on, and since I removed them ultiple scenes, so does the Arcade physics debug - so everything works now. I am not sure why the arcade physics debug did not work for every scene, not just the first scene = this.make.tilemap({ key: 'map' }); this.debugGraphics =;
  2. the-simian

    Phaser 3 debug property in physics not drawing debug layer

    Ok i did some experimenting, and I was able to figure out that the debug would only draw for the first scene in set in a list of scenes. I am not sure why, but i'm happily debugging now change scene: [StartScene, GameScene], to scene: [GameScene], and that works just fine.
  3. Hello, I wanted to post here and ask about setting the game so you can debug physics. Firstly: I am doing what I see in a lot of the examples, which is setting the debug property in the game config. I've added a snippet of my config. I'm not 100% sure why, but this doesn't draw anything. I did, with some looking around, figure out how to draw a layer over the tilemap itself, but I really need to also draw over the player as well. plus those lines indicating velocity seem useful. The code that does correctly draw over the tilemap I have also included. My guess is that I am doing something obviously incorrect. I seem to recall that for an older version of Phaser I needed a plugin to make the debug layer work correctly. Is that still true? If so what's the 'most correct' one to include? Could something be interfering? I do have an animation on my player sprite, and there's a background layer too, but disabling the background still did not help. Thank you for any help! //If i include this in my create() method I get some desirable results, { tileColor: null, collidingTileColor: new Phaser.Display.Color(243, 134, 48, 128), faceColor: new Phaser.Display.Color(40, 39, 37, 255) }); /// This is my game config, it doesn't seem to do anything when I set debug: true const config = { type: Phaser.AUTO, width: constants.WIDTH, height: constants.HEIGHT, physics: { default: 'arcade', arcade: { gravity: { y: 400 }, debug: true //does nothing. } }, scene: [StartScene, GameScene], pixelArt: true, antialias: false, callbacks: { postBoot: game => { game.renderer.addPipeline('Custom', new CustomPipeline(game)); } } }; const game = new Phaser.Game(config);
  4. I was browsing the dev logs and was curious about maybe adding a point light, like in this image. I know I could add a custom GL pipeline, but I figured since this image exists, maybe at once time there was a demo showing how to do this with Phaser 3. can this still be done (as of about v 3.10.x) or is this gone? Thank you to anyone who knows or this... Where the tilemap is blocking the point - light.
  5. I've been working on this for a few days, and I've managed to get some answers. I'll post what I know, but I think I'll need to follow up with better information later, when I have time to compose it. Ok so the first thing - EffectLayer is totally gone, the entire system of working with WebGl was overhauled and its significantly better now in phaser 3. I can't speak to performance, but the organization seems better. Unfortuantely there's zero documentation here, so I'm just reading and testing. As for extending or adding a custom pipeline, you can do something like this: inside of your game config... window.Phaser = Phaser; //just a fairly normal config here. const config = { type: Phaser.AUTO, width: constants.WIDTH, height: constants.HEIGHT, physics: { default: 'arcade', arcade: { gravity: { y: 300 }, debug: false } }, scene: [GameScene], callbacks: { //THIS IS THE PART I AM TALKING ABOUT! postBoot: game => { game.renderer.addPipeline('Custom', new CustomPipeline(game)); } } }; const game = new Phaser.Game(config); = game; you can use the PostBoot handler to add more pipelines. now where you might have used `.setPipeline('Light2D)` or somesuch, you can instead use `.setPipeline('Custom')` As for the contents of that pipeline... you'll want to write it like you see the existing pipelines. I'm still experimenting with this part and will followup for anyone else reading who is curious how to do this.
  6. Hello I've been looking into this, and I was looking for some insight on how to use or extend the shader pipeline in Phaser 3. Just to cover my bases, here's a few things I've found. This first was this article here: . I am assuming that the EffectLayer is no longer there, as I did not see it any longer in the documentation. I did see some of the examples of the lighting pipeline and was able to get that workingm whereby you could target an image and call `setPipeline('Light2D') ` and get normal maps to work properly. What I am asking is, how would one add more 'pipelines' or integrate their own shaders into a Phaser3 game? A good example might be to implement underwater effect, or do occlusion lighting with decent performance (sort of like illuminated.js). I noticed the pipelines being registered here: , but I didn't see the right way to add more, nor any real examples on the pipelines besides the `ForwardDiffuseLightPipeline` (which was the `Light2D` pipeline). I did notice there was a pipelines registry here: , but I wasn't 100% sure how to register more, or if there is a correct convention for them. Its totally possible I've missed something here or there or in the docs, and I'd love somone to point me in the right direction if they know more. If anyone wants to see an example of the Light2D-pipeline example working, I'd be happy to share. One question for the authors of the engine... if you see this: why' did you limit the lights in that pipeline hardecoded to 10? Performance or another consideration? Thanks in advance for any guidance.
  7. the-simian

    The Evolution of Phaser 3 and Lazer

    Honestly there's nothing wrong with Phaser 3. With major version changes its totally ok to have a large departure from an API. Phaser 3 is , in many ways based on the hard work from Phaser 2 and Laser, so why not stick with the brand name? Breaking changes are acceptable, every other library does it! You increased the major version, so you did the right thing
  8. the-simian

    The Phaser 3 Wishlist Thread :)

    Some ideas - Good integration with Observables, so we can treat game events like streams and react that way. [here's an example]. I think this would be an even better way to handle async than promises. There's a learning curve, but the payoff for games is awesome. - Clear patterns for UI integration. I tried to get that one called zebra working, but it was clunky. Theres also Feathers UI, but I don' tknow much about that. There's also html integration, but then there's issues of z index, etc. - Better plugin pattern. The old decorator-ish one required too much knowledge of Phaser internals. - good module loading system, and community support of a loder like rollup with tree-shaking. which leads to... - Phaser is more modular and able to import only necessary pieces. - Rely on core PIXI modules, if we're using pixi (not a customized version) ...but if we do customize pixi, its via a seperate shimming module.