TL; DR.
I ported Wako Factory’s Samurai Riot to PS4, Xbox One and Switch, with only the Switch port making it to the finish line due to impromptu requirement for the port to be compatible with PS5 and Xbox Series, and effort being best spent on Switch with had the best audience for the game.
My work included
- Porting the game to the 3 platforms with each manufacturer’s constraints and APIs
- Re-working core elements of the game and optimizing it quite a lot
- Integrating new assets and translations for the Definitive edition.
About the game
Samurai Riot is a Beat them all game with up to two players, playable solo or in couch co-op. It was initially made with Unity 4.
I joined Wako Factory’s team as a freelancer to port Samurai Riot, their Beat Them All PC game, to consoles; at the time, it was PS4, Xbox One, and Switch.
Since this was a royalties-only contract, it took a long time to port alongside my other business activities, and by the time the game was nearly ported to Xbox, PS4 and Switch, Sony and Microsoft asked us for the game to also be tested and work on PS5/Xbox Series, which would have required resources that the team did not have (dev kits, mainly), and those efforts had to be aborted in favor of the Switch port, where the game’s targeted audience was more likely to be.
You can find the game’s Nintendo store page here.
My work on the game
As I joined the team to port Samurai Riot to consoles, I quickly realized that the work would be heavier than expected; the game was the first game of the original dev, and most of it was poorly optimized and made naively – which was not too surprising for a first game – to the point it could not launch on the Xbox One’s RAM without saturating and crashing it.
For instance, most of the game assets were located in the Resources
folder, sometimes duplicated, with lots of actually unused assets tagging along and being released in the packaged game. To avoid loading screens, all enemy sprites and animations were loaded at game launch, no matter what level was actually launched.
This was fine on gaming PCs, but took a large amount of time on Xbox and PS4, until it finally crashed, lacking the necessary memory to accommodate the heavy load of high-res spritesheets.
I started with a long work of Optimization , starting with the loading system and the compression and organization of spritesheets, making Atlases and bundling what could be bundled together. I moved over anything from the Resources
folder to AssetBundle
s, with dynamic loading of assets, as was required by the porting guidelines of the Nintendo Switch anyway – in order to get way smaller updates, and reworked the Asset processing and loading pipeline, which also greatly reduced building times.
Also, the game was laggy in some instances, which was
So before the actual porting work could perceptible but OK on powerful PCs, but felt very bad on consoles, with occasional freezes and laggy levels; it had to do with the project’s 2D navigation system being used for very large levels and being rebuilt at specific times during gameplay, with navigation meshes for some large levels being especially complex. I dived in the Navigation system code and divided the meshes into smaller chunks on large levels to avoid frame rate drops, as well as made the re-building system start on another thread so it did not freeze gameplay.
I took the opportunity to also fix bugs that were first released on the PC version.
Porting efforts also included the usual integration of each console’s API for :
- Save games and cloud saves
- Console video players for the intro video
- Specific controller schemes and matching UI Buttons
- Achievements
- On-screen keyboard for high-scores
- Handling of suspend and resume
- Integrating plugin DLLs for each platform
Also, I handled the submission and review process on manufacturer websites.
Finally, the team asked me to integrate the new improved assets for the Definitive Edition, including more fluid animations for the main characters, new background ambient elements, automatic unlocking of initially “backer-only” skins, and new translations.
Overall, although submissions to Xbox One and PS4 were aborted close to the finish line, this project was a very good opportunity to learn more on Console Porting , and use previous experience on profiling and optimization to get the game to a console-ready state.
It also felt great to actually play the game on my own actual Switch when it was release, even though I’d rather have cut my foot than playing it again after years of testing it repeatedly 😉!