What kind of difficulties did you have before porting the factory building game 'Factorio' to Nintendo Switch?

Factorio , a real-time strategy game in which the main character, who has crash landed on an unknown planet, builds a factory to go out into space again and fights against protozoa, will be released on Nintendo Switch on October 28, 2022. Factorio programmer Robert Asaftei, Twinsen, spelled out the issues that had to be cleared in porting this work, which was released on PC in August 2020, to the Nintendo Switch.

Friday Facts #370 - The Journey to Nintendo Switch | Factorio

Factorio is a game that builds a factory on an undeveloped planet while automating various tasks. You can see the basic game content from the following article, and additional elements of the official version from this link .

A real-time simulation game 'Factorio' that builds and expands a factory on a drifting star while automating various tasks - GIGAZINE

The reason for the project to port Factorio to Nintendo Switch was a discussion held around February 2021. Mr. Asaftei, who is a big fan of the Nintendo Switch system, said that while considering the future of the game and the next project with the development team, he wanted to port Factorio to the Nintendo Switch.

Asaftei, who has spent years in development hell launching a sub-project of Factorio, said that porting 'fails quickly', meaning that the project succeeds or fails before spending too many resources and getting bogged down. The goal was to find out quickly.

The first thing Mr. Asaftei started was the question of whether it is possible to compile Factorio for Nintendo Switch. In particular, Factorio's library was built using a custom FASTBuild script, so the ability to make it work with the Nintendo Switch was a big concern. However, the Nintendo Switch documentation is very detailed, so Asaftei was able to create a FASTBuild script for Nintendo Switch with a detailed understanding of the build system.

Mr. Asaftei successfully cleared all compilation errors on March 3, 2021 and successfully built and ran the game completely on the 4th, but suffered a crash immediately after execution. After that, Mr. Asaftei, who faced various technical problems such as window initialization, audio, file system initialization and access, and network stack initialization, gradually cleared it by fumbling. I finally succeeded in launching the main menu.

It took 20 minutes to start up, but Asaftei said at that time, 'It was a great feeling to suddenly have everything working. Background simulations were drawn correctly, sounds and music was played, and even the GUI operation using the touch screen was working.All the fixes and implementations were finally visible.”

Since it is a debug build, the startup time of 20 minutes was within the expected range, but the startup time was an important issue until the end. In the end, it seems that the startup time of Factorio has been shortened to 70 seconds when installed in internal storage.

The next issue is performance optimization. It is a difficult problem to say what is sufficient performance, but Mr. Asaftei aimed to 'maintain 60 UPS (updates per second) until the average player launches the rocket and reaches the ending'. Although there were many things that had to be done for optimization, the work became easier thanks to the development tools, so the goal was cleared although it was just barely.

Multiplayer was also an issue. Mr. Asaftei didn't want to exclude multiplayer from the Nintendo Switch version of Factorio, and he also wanted to realize multiplayer between the PC version. Therefore, there was a problem that the game had to run on two architectures, ARM and x86, but there were plenty of tools to test the differences between the two environments, so it was not difficult to check the operation itself. There may still be some sync issues, but Asaftei said, ``I'm sure players will cooperate with us in finding the remaining sync problems,'' he said, expressing his expectations for Factorio fans. .

In addition, Mr. Asaftei made it possible to operate Factorio, which is made to be operated with a keyboard and mouse, with a controller of Nintendo Switch, and to be able to intuitively operate with a controller without changing the GUI design significantly. It seems that I have been worried about it.

In this way, the Nintendo Switch version of Factorio became playable in August 2021, but even after that, it took time to adjust and improve, and as mentioned above, the final release was October 28, 2022. The day has come. Asaftei describes this as a 90/90 ratio: ``90% of the code accounts for the first 90% of the development time, and the remaining 10% of the code accounts for the other 90% of the development time, for a total of 180%.'' I have commented that therules apply.

Asaftei was the only person who worked full-time on this porting project, but he said that many people cooperated before it took shape, and Asaftei said in a post on the official blog, ' We let the rest of the team focus on the expansion and not get in the way, but helped with the details, etc. So, as with anything, teamwork is important. Also, many people at Nintendo supported the launch and development, and it was an honor to be featured at such a big event as the Nintendo Direct,' said other development members and Nintendo's relationships. I thanked those who

in Game, Posted by log1l_ks