Navigation

Phaser Dev Log - March 2021

Published on 31st March 2021

Greetings everyone! It's time for another Dev Log to let you know what's been going on in the big wide world of Phaser :)

Phaser 3.54 and 3.54 Released

Since the last Dev Log, there have been two new Phaser releases. The first was 3.53 "Anastasia" released on the 8th of March. There were a handful of new features in this release, the primary one being the ability to now run Phaser from within a Web Worker. I spent a good while going through the Device classes and making sure they didn't access any objects not present in a Worker environment. The end result is that you can now import Phaser into a worker and call any of its static functions.

There were some updates regarding Tilemap parsing, so more of the Tiled data is retained (such as Wangset data) and finally, you can now set the preservation of the WebGL drawing buffer directly from the game config.

I've also been busy updating the way the Display List operates, just to make things a lot cleaner internally (and more explicit for developers). Game Objects now have a new 'addToDisplayList' method, that allows you to add the Game Object to any given Display List. If you don't pass one in, it'll use the default Scene Display List. However, as there are new objects in 3.50 such as the Layer that maintains their own Display Lists, this now gives you the ability to easily move Game Objects between them at runtime.

The same has also happened for Update Lists and you've got the new `addToUpdateList` method, along with removal methods for both.

As of 3.53 Phaser also no longer includes any of the Internet Explorer 9 polyfills. To be honest, IE9 support isn't quite as important as it used to be! There is, however, a brand new IE9 build in the dist folder. So if you need it, you've got it, but the default is to save some space and processing time and not include any of those polyfills any longer.

3.53 also included a number of important bug fixes, especially around the Spine plugin. However, it would also introduce a DOM Element bug that I only just fixed today in the 3.55 beta version, so if you use interactive DOM Elements in your game, please hold off until 3.55 is out.

The 3.54 release, codenamed 'Futaro' (free cookie to anyone who guesses the anime this comes from 😁) includes a bunch more Spine Plugin fixes and a fix for a very long-standing Web Audio bug on iOS. To be honest, the audio system needs rewriting from scratch, but I'm not entirely sure if what we have is good enough to get by on, or if that can just wait for Phaser 4.

Today I started work on 3.55 'Ichika', which includes fixes for the DOM Elements and is going to need to rework how plugins are handled slightly, due to a deeper internal issue that the Spine Plugin bought to the surface. My hope is that this should be the final release for a while, allowing me to refocus my efforts on both updating the Phaser website (more on this below) and restarting dev on 4.0.0.

However, supporting you is my priority - and if you find something that needs fixing urgently in 3.55 then I will of course look at it. As much as we'd all love a new website and 4.0.0 release, it's important not to work on those to the detriment of 3.x developers. If that means it taking a bit longer, then so be it.

Lockdown 4.0!

Last time I wrote the UK was still in the grip of another nation lockdown. I suspect like lots of you my productivity had taken a direct hit as a result of home-schooling. Thankfully, since then, schools are open again and I've now got most of my normal routine back. It's not quite the same as it was pre-covid, but it's a *lot* better than it was a month ago!

I was also lucky enough to get my first vaccination yesterday, as they started rolling them out for my age group in the area I live. I know it's still going to be months before everything is truly "back to normal" (if it ever really will be), but at least things are progressing in the right direction. I wish you all the best if you're still struggling through lockdown measures where you live.

New Phaser 3 Docs System is live

As I reported last month, Francisco has been busy working on the new documentation site for Phaser 3. This has now gone live and you can access it at https://newdocs.phaser.io

We intend to make lots of improvements to the docs in the coming months, not least of which includes the layout and design, but even in this 'rough and ready' state I still believe it's lots better than the previous JSDoc template we had - and the search is much more powerful!

If you find an issue with how the docs work then you can report it in the #newdocs-feedback channel we created in the Phaser Discord. If you find a mistake in the documentation itself - for example, a typo or missing parameter, then please open that as an issue on GitHub. Thank you!

All Phaser 2 Plugins are now $5

I've recently revamped the Phaser Shop and figured it was about time to effectively give the plugins away. Therefore, all Phaser 2 / CE Plugins are now just $5 each. This includes the Box2D Plugin, Particle Storm, and the Virtual Joystick.

Most of the Phaser 2 books, such as the guide to the Scale Manager and Tween Manager are now completely free.

I've also removed a few products no longer available. Where a price hasn't changed is if it's an affiliate's product, not created by me. In all other cases, they're now either free or heavily reduced in price.

Phaser News Update + Search

One of my biggest regrets from last year was stopping posting news to the Phaser site on a regular basis. Up until August 2019, I had posted an article every day, give or take. During 2017 I was actually posting 2 articles a day! One tutorial and one game. This, honestly, is why I stopped in late 2019. I had literally burnt myself out. I tried to kickstart the flow of news again by getting the community involved. We collected the news on Trello and would post it up on a less regular basis, but sadly this only worked for a few months. By the end of August, there wasn't a single new post on the Phaser site and it lay dormant until December 15th, 2020.

Although I was still writing my Dev Logs those were all appearing on Patreon, so even that content wasn't on the Phaser site. Not having news on the official site is bad on several fronts. First, it looks at first glance as if the project is dead. This couldn't be further from the truth, of course, but any casual observer would be completely forgiven for thinking it was the case. Secondly, it meant there was no content for the weekly Phaser World newsletter. So a direct way of communicating with thousands of developers was instantly lost on that front as well.

Plus, no news and no newsletter meant less traffic to the main site, which of course means less ad revenue. We don't rely on ad revenue but it still helps pay towards our costs, so it's not something to be ignored or given up lightly.

Yet during this time, the wonderful Phaser community was still publishing lots of superb tutorials and games! I was still collecting them all (I use Pocket for this task) and the backlog of potential news items was growing by the day. After all of the hard work on the 3.50 release, I set about addressing this issue and cracking through the backlog.

Since February I've posted at least one news item to the Phaser site every weekday. I make sure we have 3 tutorials and 2 games per week, but sometimes important things sneak in so we'll get multiple posts in a day. Because of the way the site works I'm able to queue-up news ahead of time. Using this feature I've got news articles already in the queue right up until the end of June. Being able to work several months ahead of schedule gives me the breathing time I need. I don't have to wear myself out every week. In fact, it doesn't matter if I don't add a single article this week, as long as I keep staying ahead of the curve the site will continue to populate itself with content.

Yes, it means that some of the tutorials and games I'm now adding to the site aren't "current", but the content is still solid and relevant - and the games are always relevant, no matter which version of Phaser they were created with. My intention has never been to 'review' games, just to feature them. To hold them up as examples of what both professionals and hobbyists can achieve if they use Phaser. And to that end, I've thousands of games still to add to the site 😄

I also added a new feature to the Phaser site that allows you to search news articles. At the top of the News pages, you'll find a search box. This will search the titles and descriptions of all news posts on the site since the news was started.

For example, did you know we've had 6 posts about cookies and 11 about wizards?! Anyway, this should help if you're trying to track down something from the past, or a tutorial about a specific subject, such as Firebase.

Phaser World is back!

Thankfully, as a result of a constant flow of news onto the Phaser site again, I've been able to resurrect the Phaser World newsletter. This has remained dormant since the posting of news stopped. I felt it was time to get things alive again and Phaser World is a great way to tell you about all of the new things that have been going on.

Since the last Dev Log, I have published issues 150 and 151. I am publishing it every two weeks, instead of weekly as it originally was, just for my own sanity really. It's a volume I feel comfortable with.

If you missed the back issues you can read them all online on the Phaser World page - where you can also subscribe.

If you'd like to have an article featured on the site and within Phaser World as a result, then please get in touch! I'm happy to feature tutorials, new plugins, blog posts, and games. As long as it's Phaser-related. Just email support@phaser.io or tweet to @phaser_ and I'll pick it up. If your article is time-sensitive, i.e. a conference or online workshop, please make me aware of this in your communication.

Phaser Web Site and the importance of convergence

I've been thinking a lot about the Phaser site this year. It is the home of everything I do and like all well-loved homes, is in need of some renovations.

When I very first released Phaser it didn't even have a website. I just wrote about it on my Photon Storm blog. You can read my first-ever post from April 12th, 2013. This was the first public release of Phaser (v0.5) and based on the uptake on GitHub it was clear I had something special on my hands. As a result, a proper website needed to follow.

In order to do this, it needed a visual style. For this, I turned to my pixel-buddy-in-crime, Ilija. He worked his magic, turning a set of cute but curious-looking aliens and a spaceman into the logo we have now.

You can read about his process in this blog post from the time.

Thanks to his involvement 4 months later it had gained its own visual style and a basic website was created.

The original site was released in early September 2013 as you can see in the archive stored in the Wayback Machine. At the time it had the classic planet logo and a big Download button, that took you directly to GitHub where you could get version 1.1 😀 It had a features panel, a couple of tutorials, a few games and that was it! All of the real content, such as the docs, downloads, and dev logs were external to the site. I was mostly blogging about it on my own site and it was enough for the time.

It remained this way for quite a few months. I was really busy both with client work and updating Phaser. I like the way this version of the site says "Looking for a Flash game framework? Try Flixel" in the footer :) That's how early it was in the era of HTML5 games. Flash still dominated.

Fast forward to September 2014 and nothing much has really changed in terms of the site:

All we've gained is a really long news list that is getting a little out of control! Every one of those links was still external. Not one of them, not even the Phaser releases, links to the Phaser site itself. The 'featured' games haven't updated in over a year, either. Even with a basic single-page site like this we were still getting around 25k to 35k views a week. I knew things had to change and I spent a good while working on the new site. This went live in early March 2015. So just over 6 years ago today.

Traffic sky-rocketed as a result. From 30k views a week to 220k. You can clearly see the jump in this graph (also notice how we're doing more traffic to the site now than ever before in its history)

I had bought the documentation, some key tutorials, all of the news, games, and examples into the core-site. The forum still linked out to the HTML5 Game Devs Forum, and you still went to GitHub to actually download Phaser, but the important stuff was finally under one roof and the updated design reflected this:

I loved this design. Ilija and Tom Waterhouse had done a fantastic job on it. Ilija with the character designs and Tom with the site design. Phaser is, after all, a game framework. It should look fun and represent having fun. Which is something I fully intend to keep with the new site.

But jump ahead to 2021 and the site still looks the same. Indeed it's still the same core technology powering it all. Things have moved on and it's time for a change, in lots of ways. Because after all, Phaser will partly live or fail based on its online presence, so it's important this is jump-started significantly this year to keep it primed for the big changes to come.

To me, this is very much as important as the development of the API itself. So let me break down what I'm thinking about how to approach this. Also, please understand I'd like for this to be a discussion. If you have any ideas for the site in terms of features, please do let me know! Email, Discord, or Twitter is fine.

Phaser 2, 3, 4, and beyond

It's important for the new site to easily let you switch between versions. Right now, v2 and v3 content are mixed together and it's hard to know where to go. This is especially true for newcomers to Phaser. Or those following relevant, but perhaps out-dated tutorials based on v2. So an overriding factor of the new site has to be that you swap between versions with ease and it's clear which version you're looking at material from.

It will be crucially important with Phaser 4 because it will be so radically different to 2 and 3 that it will need to be painfully clear that you're looking at a v4 tutorial or v4 code.

Everything under one roof

This is probably the most important thing the new site has to do: Be a single source for everything Phaser. For too long now Phaser has been split across different locations. In the 2015 update, we did a good job at merging the v2 content together, but in recent years it has started to drift again. We've only recently had all the v3 examples added to the main site. The v3 documentation still doesn't exist on the main site, but hangs off a sub-domain - and for years before it was just a GitHub Pages hosted JSDoc template. Downloads and issues are handled on GitHub, examples are both on GitHub and the site, but not properly in sync. There are no less than 2 Phaser Forums and a Facebook group not even run by us. Never mind Patreon.

I honestly think it's time for all of this to change completely. I want the Phaser site to be the only place you ever have to go. Where you'll find documentation, the forum, news, tutorials, downloads - just everything. It needs to feel like a community, with its own user system, the ability for users to leave comments, ask questions and just feel involved. We've actually a really diverse and large community but it's mostly centered around Discord and Discourse. I think it's fair to say that most people have absolutely no idea just what is going on in the wider Phaser world because it's really hard for them to find out. This needs fixing, and quickly.

The other important thing to do is ditch Patreon. This is easily the biggest and honestly most scary change I need to make, but Patreon is just a horrible user experience, both for creators and patrons. I can't even format a code snippet without having to take a screenshot of it! It has the most hideous post editor you've ever laid eyes on and a real lack of innovation. It genuinely stops me from offering special content to patrons, because it's so arduous to manage. However, the money it brings in is literally the lifeblood that causes Phaser to continue. So swapping it cannot be done lightly. It has to be done really carefully. But it has to be done.

The forum is another area that needs consolidating. We currently have a few Phaser boards as part of the HTML5 Game Devs forum, that should have been closed down but are still active. We've also got the actual official Phaser Forum running on Discourse. This one is a lot more active and I'm very grateful to Discourse for offering us this service for free.

However, it's yet another place where Phaser users congregate that we don't actually own. We cannot take those forum users and allow them to log in to the Phaser site, nor can we merge content from the old forum to it. I firmly believe that forums still have a viable place both for support, discussion, and showing off what people are up to - but I want this to happen on the Phaser site. I want all of the old forum content imported and for users to have a single Phaser account that opens access to this. No more split content.

Another important section is the Phaser examples. I've always been a firm believer that it's usually easier to learn by looking at running code than being told something. And to that end, I have created literally thousands of code examples over the years for all versions of Phaser.

It's not an easy process, though. There is no sync between GitHub and the examples. You cannot link an example to a specific version of Phaser - which is really important when you've got changes as we had between 3.24 to 3.50. It would have been really useful to be able to keep all of those 3.24 examples and then just introduced a new set of 3.50 updates.

I would also like the ability to search examples and for you to play with them live in the browser, perhaps fork them and save them to your own user area. Then when you log in to the site, you can see which examples are new. We can link areas of the documentation to examples. I can release 'Backers only' examples and all kinds of things that are technically impossible with the current site.

Games, glorious games

Finally, I believe we also need to do better at promoting games made with Phaser. I've been a strong advocate that we should 'feature games, not review them', as I've said earlier in this report. To me that is important: I'm not here to pass judgment on your games, I'm here to show them off to everyone. It doesn't matter if you're a multi-national studio or a bedroom hobbyist. What matters is that you made something in Phaser, that is all it takes to be featured on the site.

Even so, there are lots of really high-profile Phaser games that literally no-one knows about. I want the new site to shout games from every page. And not just the big-names, either. All featured games should have the same potential coverage. Yes, it "looks better" if we only include big well-known titles, but that isn't true to what I believe Phaser is. It should appeal to all skillsets, all audience levels.

Of course, if we have a Phaser user system, we can link games to users, letting you build-up an online portfolio of your Phaser creations. Add to this the constant need for companies to hire Phaser devs and you can easily see where this could lead.

Final thoughts

The Phaser ecosystem is vast. Much bigger than a lot of people realize and it's time the site reflected this. I've been building websites since the early 1990s, back before browsers could even display images. It's my absolute passion and it's why Phaser will always be a web-first game framework. Now it's time to reboot the Phaser site so it's ready to cope with everything I've got planned to throw at it with Phaser 4 and well beyond.

This process has started and both Tom and Ilija have been given briefs for the new site, to let their graphical imaginations run wild. I cannot wait to see what they come up with.

So it's going to be a mixed bag for the next few months. I'm going to focus on both the 3.55 release, the restart of 4.0.0, and the new website. I'm under no illusion that's a lot of work, but even 8 years on Phaser is still what keeps my brain awake at night! I cannot stop thinking of ways to improve it and its ecosystem, and to do that we all need a new house to live in. Time to get building.