Beta week 3: Origin and economy design

This week has been kind of slow, as most of it has been spent outside Phaser and Firebase and instead back in the LAMP environment, which is where I do database work. With most of the front-end stuff in the can, it was time to concentrate on bedding down the fundamentals of the game economy, starting with player-versus-environment systems.

I have opened up the Origin match mode on my local dev machine but haven’t got it to the stage of adding it to the beta, as I have spent many days refactoring JSON files and modifying scripts to auto-generate PvE opponents to play. This included rethinking the onboarding process to include teams filled with players of less than 100% Fitness, which is necessary to prevent new coaches getting belted in early matches.

I have had a tendency of coming back to parts of the Mr Football project that I have ignored for a month or two and taking a little while to remember all the bugs and/or missing features that I left the last time I abandoned it. I guess this is normal and to be expected for a solo dev. I haven’t ever had the feeling of staring at my old code and wondering what the hell I was trying to do, so at least I’m in control of myself and don’t get sidetracked.

In the case of my PHP scripts for auto-generating PvE opponents – referenced informally in my Roadmap spreadsheet as “Mr_X” as a tribute to Kelvin King’s shadowy antagonist and his X-Syndicate in Hounded on the Commodore 64 all those decades ago – I had built them originally on the assumption that every player would be at 100% Fitness so that the only difference between the teams would be the total stars on the cards. This has proven suboptimal, particularly in the early game where coaches’ teams are still filled with underdeveloped cards. I had to add equipment to match their varying levels of Fitness percentage, something which I can exploit later on in PvE formats by juicing up lesser cards with equipment for which they normally do not qualify (a classic hero collector RPG design ploy).

This is not flashy work. I don’t have any brightly-coloured screenshots to show off this process. It mostly centres around text outputs from auto-refreshing PHP scripts to repopulate MySQL tables with randomised results according to increasingly obscure criteria. Yawn! The mathematics of it are not complicated, just a matter of keeping all the arrays aligned. Probability is like that: complexity arises from repeated iterations of simple equations.

At the moment, I have around a thousand PvE opponents set up – 300 or so for Campaign and 700 for Origin – and a PHP script that updates a set of MySQL tables then refreshes itself after a delay of two seconds called from the client, so as not to overload the server. It ends up taking about 20 minutes to regenerate all the teams. I am going to have to expand this process to include many more Origin teams, as this mode (based on Idle Heroes‘ Tower of Oblivion, which itself is an adaptation of Summoners War‘s Trial of Ascension) requires a very long line of similar-yet-ever-more-slightly-powerful PvE foes to best in succession. Then there are the PvP match modes of Ladder, Grade and Iron Mode, some of which I suspect will have to be populated with Mr_X teams to kick things off.

At the end of the week I am pleased to report that the scripts are all rewritten, and I can move on to new areas. It has been painful not being able to chop and change, as I felt it necessary to commit to this one mini-project until it was done.

I think the Journeys and maybe the Selection screens are all that need to be upgraded to RC or gold to get Mr Football to a point where I feel confident enough to open the beta to all comers. I suspect it will be a couple of weeks for those to be at a level with which am comfortable enough. Then it will be on for young and old, as I schuss towards a soft release with IAPs.

Exit mobile version