Crunch week 5: renderTextures, rexUI plugins and PWAs with Workbox

I still haven’t completed the first of the four main tasks in my outline, but I feel like I am progressing well. This is because I put by far the most time-consuming task first, which was onboarding and the early game – something that touches most subsystems. I got something done every day, so at the end of the week I can say that it was a solid week of production even if I haven’t managed to tick off all the things on my list once again.

Polishing off the Reception (mail) and Settings scenes was the main priority, and I did manage to get both of those screens to RC stage. The setting page took me a full day, and I am very happy with how it looks now. There are sliders for audio volume, on/off switches for notifications, choices for camera and font selection, and a bunch of buttons for legal texts. I have even put in a HTML box to enter gift codes, a feature I have always enjoyed in other games. It may not be innovative, but it’s a box ticked.

The Reception page took a bit longer, as I made the (to me) momentous decision to abandon my own efforts at building scrollable containers and embrace the rexUI plugin library. I had spent years avoiding rexrainbow‘s wide range of plugins (there are 236 of them!!) before relenting earlier this year on the BBCode one, which is mandatory as you can’t get rich text any other way in Phaser 3. My thinking on that has been that Phaser, Firebase, and all the other technologies I have had to learn are all complicated enough without having to learn another syntax to fit my stuff inside rex’s system.

Nevertheless, I still haven’t managed to find a scrollable container solution that is as good as rex’s, and shifting to it has been mostly painless, albeit it has taken me a couple of days to get the hang of it. There are some limitations to what you can do with the cells in his tables and containers – something which I knew would annoy me – but I have figured a workaround by using renderTextures, a feature I am starting to rely on more and more.

Containers were always a bit of an afterthought in Phaser with its main strength very much lying in textures, so renderTextures allow the flexibility of containers while also making use of Phaser’s superior method set for textures. There used to be a performance hit for using renderTextures as it created a copy of each one for WebGL and Canvas, but Phaser 3.60 has fixed that, and I would not be pushing the envelope much anyway by using it for simple static UI elements.

On a higher level, I have spent a lot of time in between childminding duties reading up on my options for bypassing the App Store and Play Store and instead hosting Mr Football on my own Web site FanFooty, which is high-traffic enough in the target demographic for this game to provide its own channel for app discovery. Google Workbox looks very promising for creating Progressive Web Apps (PWAs) which allow for installation of an app on mobile device home screens including locally-stored assets, though there is a 50MB limit on Apple devices. Mr Football is currently running at an app weight of 100MB, so I will have to do some juggling with indexedDB or just downsize some of my assets to fit in on iOS.

My plan for the first year has always been for it to be a test run, keeping in mind that it’s my first game and its ambition is off the charts. A live-service massively-multiplayer online game for mobiles to be run by one person as a second job… there are so many things that could go wrong or not work, so I am planning for the game to ramp up as slowly as my lifestyle will allow it. Maintaining Mr Football as a PWA which anyone can access on a Web site, but which has most of the advantages of a native app, not to mention paying 5% of revenue to Xsolla or RevenueCat instead of 30% to Apple and Google… I think it best for a number of reasons to keep it out of the Stores to start with. I can always move to the Stores later, it doesn’t have to be an either/or thing.

I ended the week still bugfixing that transition for the gamestate variable in the match functions that I mentioned last week, it’s a finicky thing to figure out where the bugs crept in across a wide multidimensional array. Once I’m past that, all the other outline items will open up and I will be on the downhill stretch on the road to beta.

Exit mobile version