The head of the FlowPlay gaming direction, Craig Robinson, shared his experience of transferring a Flash game project to a modern platform.

Robinson illustrated his advice with an example of porting the Vegas World social MMO casino owned by FlowPlay from Flash to the OpenFL software platform.

The new engine for hosting Vegas World had to meet the following criteria:

  • The ability to continue supporting existing games and communities
  • Unified code base for placement on websites and mobile platforms
  • The ability to make the most of the existing ActionScript code base
  • Smooth transition to a new developer platform
  • The ability to use existing artistic assets
  • Choosing a non-proprietary software platform to avoid a repeat of the situation with Adobe Flash
  • Support for high-quality gameplay and future innovations

At first, the FlowPlay team considered Unity and HTML5/JavaScript, but eventually settled on the OpenFL framework based on the Haxe programming language.

The Haxe codebase can be used to run any mobile and desktop applications, as well as HTML5 browser programs.

It is able to adapt to new languages, platforms and technologies as the gaming industry develops.

Porting from ActionScript to Haxe is relatively easy, since the similarity of the syntax of the languages allows you to use most of the ActionScript code base.

In addition, the Haxe/OpenFL open source code guarantees long-term support and development of the platform.

Robinson divided the Vegas World porting process into 5 stages.

Testing. First, the developers created and launched a small game for iOS, Android, Windows and HTML5 on Haxe/OpenFL. This proved that the platform is viable and provides the required performance and functionality.

Automation. There are a number of tools for automating translation from ActionScript to Haxe. But in practice it turned out that they often bring more problems than benefits. FlowPlay decided to write their own translation tool and, if necessary, perform the rest of the porting operations manually. Most of the files were easy to transfer, some of them required minor intervention.

Current porting. In accordance with the philosophy of keeping the new code as close to the original ActionScript as possible, FlowPlay first ported the main libraries, then moved on to third-party libraries, the game shell, social rooms, avatars and, finally, mini-games hosted inside a larger metagame.

Error identification. Haxe/OpenFL supports Flash output in the same format as ActionScript, so developers were able to compare the new game with the old one in order to identify and correct any anomalies.

The final conversion. When developers achieved comparable or better performance and functionality compared to the Flash version, FlowPlay used Haxe/OpenFL to create the web version and the Vegas World mobile app.

“The inevitable demise of Flash meant that we had to make a choice — to abandon our code, games and clients and create a new game on a new platform, or find a platform that would allow us to continue supporting existing gamers, as well as attract new players on mobile platforms. We chose the latter path, and it worked well for us,” Craig Robinson summed up.

See also:

Tags: