Optimization and Re-factoring

Raid Encounters is my first JavaScript project, and I’ve learned a lot of things along the way in regards to actual coding with the language and now that I can kind of oversee the body of work, there are a lot of changes I feel can be made to further optimize the codebase and get it ready for some required tweaking in terms of performance, design, and everything else that comes with creating a universal experience.

While the “campaign” is pretty much finished with Raid Encounters, I am still going to be making tweaks to loot, monsters, balance, skills, and all types of other items as I shift into putting the final touches in.  There are two major features that I feel Raid Encounters needs in order to truly set it apart from other games, and the work that’s going to go into that will be beginning shortly.  When I programmed some of the last couple of bosses in Raid Encounters, I truly felt I could now program anything I wanted without having that feeling of “Oh, that’s not possible.”  Maybe I finally got a good grasp of my scope and the abilities of Phaser, but I feel that multiplayer and user-created dungeons are possible to a degree.

Raid Encounters has really taken off on several game portals which do provide a good experience compared to playing it here on raidencounters.com  With Kongregate, they have a wonderful Leaderboard API which was really easy to implement.  GameJolt was also gracious enough to showcase Raid Encounters as a featured game of the day which was great and resulted in a lot of good feedback involving the direction of the game.  For the 4 or 5 months I worked on this game, it evolved from a point and click shooter with no Raid Party at all to what it is now.  If not for playtesting on mobile, it may have been a shooter, but it just wasn’t fun.

Which leads us to optimization and re-factoring.  I want Raid Encounters to be universal, where it can be played anywhere, and being a 2D game with limited effects this should be possible.  When I first started out I had tons of particle effects and emitters going on but it just killed mobile performance so it was something I had to take out for the time being.  I think I can further optimize the update cycles in the game to get it running smooth on at least the iPhone 5.  If you haven’t already noticed, the native resolution of Raid Encounters is 1136×640.  The iPhone 5s performance is silky smooth using Safari, but results on Android are mixed.  I’ve been using a 1st Gen iPad mini as a baseline for performance and it could still use a lot of work.  It’s important that all of this is done using Phaser’s built-in scaling functionality.  The next step after ensuring decent FPS on mobile is converting the game into proper apps for both iOS and Android and this will entail incorporating the APIs of their Game Center and Google Play Games systems for Leaderboards and such.  I think I’ll make a stab at proper Facebook integration first, but I’m still gauging RaidEncounters.com adoption for people who are playing here and not in a game portal.

As for getting Raid Encounters onto mobile, it’s going to involve Intel XDK even though I do prefer the ease of Ludei’s CocoonJS, I’m not sure about some of the pricing involved.  I’ll see how it goes once I get the game running smooth on at least an iPad mini.  If you’d like to beta test the mobile version for me, please contact me at mike (at) raidencounters (dot) com, I promise it’ll be fun 🙂