Hey. I noticed the new version was out and I wanted to know more about what some of the changes mean.
Specifically, these two parts:
Removed
The following features have been removed in this version of Phaser:
Impact Physics has been removed completely and is no longer a choice of physics system. The resulting Scene.impact property and Impact config object have also been removed.
Deprecated
The following features are now deprecated and will be removed in a future version of Phaser:
The Light Pipeline and associated components will be removed. This feature was never properly finished and adds too much redundant, non-optional code into the core API. The ability to load normal maps alongside textures will remain , for use in your own lighting shaders, which gives you far more control over the final effect.
Question 1. Why was impact removed?
Question 2. How will we implement lights now?
Thanks, and I am happy to see that Phaser 3 is getting an update. The rope object looks awesome!
Thanks! Is there a guide to creating a custom shader like that? I’ve made shaders in the past but I’m not sure where to start with something like that. Is there a way I can use the old one?
I can’t say much about Impact, either. As far as I remember, it resembled Arcade but supported slopes in tilemaps using a proprietary tilemap format.
As the changelog says, the light pipeline was deprecated because it was unfinished. The forward renderer has unexpected behavior, while the deferred renderer simply just isn’t there (there’s a shader for it, but it doesn’t look like it implements deferred rendering at all). This alone limits the usefulness of the pipeline, as forward rendering really isn’t the best option if you want many lights. In my opinion, proper lighting is too specific for a 2D framework and it’s often easier to fake it with overlays and masks.
If you really do need real lights and you know how the WebGL pipeline works, look up a tutorial on lighting with WebGL. I doubt you’d find anything for 2D lights, but even a 3D system shouldn’t be too different.
This process requires a video card with multiple render targets. Old video cards don’t have this, so it won’t work on them. There is no workaround for this.
It requires high bandwidth. You’re sending big buffers around and old video cards, again, might not be able to handle this. There is no workaround for this, either.
You can’t use transparent objects. (Unless you combine deferred rendering with Forward Rendering for just those transparent objects; then you can work around this issue.)
There’s no anti-aliasing. Well, some engines would have you believe that, but there are solutions to this problem: edge detection, FXAA.
Only one type of material is allowed, unless you use a modification of deferred rendering called Deferred Lighting.
Shadows are still dependent on the number of lights, and deferred rendering does not solve anything here.
I understand that Phaser Lights aren’t perfect, but they are so easy to use and make his own implementation isn’t for everyone.
So imo it’s better than nothing…