One completely new feature of Phaser 3 is the dynamic lighting layer. By adding light sources and marking sprites to receive lights it is possible to light them up. With Phaser 3.6.0 the default rendering path is forward lighting. The deferred lighting path is not ready yet. The shader exists but, somehow the pipeline file is missing(?).
The first real thing a user faces is the loading screen, therefore showing a progress bar is essential. The approach of loading the assets and displaying the progress is not much different from Phaser 2. The structure with the two scenes “boot” and “preload” works also for Phaser 3, but the underlying API of the file interaction has been changed a lot. In the following, I’ll show an example, how to organize the assets and to display a simple progress bar.
Using an emulator to test your Android builds can really speed up your development. Unity can build the app automatically and push it to your preferred emulator. Testing your product with powerful hardware can be a key in production. There are several emulators out in the wild and I’ll review some of them.
Cross-fading is a technique to stop one song and softly bend to another song. The following script is designed to cross-fade loop-able songs. The following script is designed to fade between two loop-able songs. Afterwards the song is played until it is replaced by another song. Just call the
Play(AudioClip clip) function and the script organizes the rest.