What To Expect When Moving Your Game To A New Platform?

Cocos Creator is a fantastic bit of software when it comes to the number of ways you can release a game. Many developers are always looking to find ways to get their game onto as many platforms as possible, maximizing the number of people who can buy their game or spend money in the game.

In the old days, transferring from one computer to another was a drag as different infrastructures in the hardware and software really can make it troublesome. If you want a great example of that, one YouTuber called The 8-bit Guy shares the insanity of getting his game to work on the many different MS-DOS PCs of the 80s and 90s

The same could go for console games as some console games would look amazing on one system, and their ports would look terrible or even unplayable in the other version.

Mortal Kombat 4 on Playstation and Game Boy Color

So we’re lucky enough to have a lot more simplicity in what the infrastructures of PCs, phones, and consoles are today.

Cocos Creator currently runs for 19 different platforms, making it one of the most compatible game engine out today. But with so many platforms, you can’t expect to just change the export option, push build, and get the same results. There’s going to be some requirements you’ll have to be prepared for when you make plans to release your games.

Today we thought we’d go over the top five infrastructures of Cocos Creator to give you an idea of what you need to be prepared to modify – PC, HTML5, Android, iOS, and Cocos Play.  We hope this article helps you when it’s time to plan out your platform publishing. We can’t share all the things to help you, but we wanted to share a few significant issues.

To help us out on this, we asked experts at Cocos, PP_Pro and Shuimolinyun, to talk a bit more about some of the issues you will face and what to expect when exporting to these big platforms.

ANDROID

Know the Fundamentals

Every android app is going to need a few essential items to make it work on Android phones. You’ll need to study the different application components, services, and broadcast receiver to help you apply them correctly to your game.

You can find most of these and what they do from Google’s developer site in the fundamentals area.

Connecting your Android NDK and SDK to Cocos Creator

For you to export your game to Android, we’ll need to install Google’s toolset that helps change your code to the code that Android needs. This means you need an NDK and SDK from Android and have them implemented in Cocos Creator. To do this, download the SDK by installing the Android Studio, and the NDK is available at the Android developer website.

Once installed, Open Cocos Creator and go to File -> Settings -> Native Desktop section

From there, you can add your root directory of both the NDK and Android SDK sections. If you don’t have this setup, you won’t be able to export your game to Android from Cocos Creator.

SDK/API integration

Making sure that the SDKs and APIs you are working on work for all your platforms is very important if you want to add anything like an ad network, calls to websites, and millions of things SDKs and APIs can do for your game. So make sure to read the documentation and see if there are any changes for the different platforms.

Prepare the memory and processing for older phones

Because multiple devices are using Android, you’ll never be too sure of what the memory or processing speeds are for these phones. This makes it hard to test if the game works on a phone and if it can run well. So it’s essential to have a few phones of different qualities around for testing purposes as well as building tools that help you find memory and processing lag.

One example is with texture compression. Some phones can support high-resolution images for your game, but not all are powerful enough to handle multiple happening in one game. Android luckily allows for hardware acceleration for different phone owners. The only issue, you may have to make multiple versions of your apk to fit these formats for each phone.

You can read more about this in the Android blog.

Texture compression for your game can be achieved with Cocos Creator in the properties section of the image placed in the assets folder. Just choose “Android” as your export and choose the different formats available.

Read more about it from our documentation: https://docs.cocos.com/creator/manual/en/asset-workflow/compress-texture.html?h=texture

Hot updates

If your game can allow your gamers to download assets from a server, you’ll need to prepare the AssetsManager module for these updates. We provided a great example from our documentation to check from.

iOS

You need to enter the Apple ecosystem

There is no way to get around this. Apple requires you to be a part of the ecosystem, which means you are going to have to get a few new items if you haven’t already.

  • You are going to have to buy any Mac computer that allows you to install the latest version of iOS
  • You’re going to have to download and start coding with Xcode as your code editor and testing.
  • You need to purchase an Apple iOS Developer Membership if you want to publish your game. The cost is 99 USD a year.

Limitation on being on the App store

Apple has been stringent lately on the things they allow you to do in your game that may disqualify you if you don’t follow them strictly as required. It’s essential that you follow the rules set by Apple not only in the type of content they allow but for guidelines on performance and design.

Make sure to read up on these guidelines from Apple on their website.

One example given by our team is if you wrap your game content inside a webpage then run it with the webview, your game will probably get rejected. Also, pay attention not to load many resources at the very beginning. Otherwise, Apple will consider your app incomplete and relies on hot updates.

If you only use webview to present a notification, it should be allowed through.

SDK/API integration

As mentioned above, check to make sure all APIs and SDKs you use in your game are compatible with iOS apps.

PC

Prepare for new controls for your game

Most PC games don’t use a touchscreen, so you need to start looking into using a mouse, keyboard, and controller support. Luckily Cocos Creator can help you with that with

For most things like keyboards, mouse, and other inputs, follow this section of our documentation:

https://docs.cocos.com/creator/manual/en/scripting/player-controls.html

Examine the different functionalities of your game

When bringing your game to PC, just having the controls functional is one thing. But making sure all of your other functionalities changed is something you need to look at in all areas. This can include the way you save and download assets, use of special items like a gyroscope, pedometer, or camera, and making sure your screen resolutions are at appropriate sizes.

PC Platform integration

There are many different platforms for PC to have your game be a part of – Steam, Epic, GOG, and a whole list of other places are available for you to have your game on. Make sure to check with their requirements and if any SDK or API calls are needed to be applied to the game.

Here are a few of the most popular for those selling their game online:

SDK/API integration

As mentioned above, check to make sure all APIs and SDKs you use in your game are compatible with your iOS or PC game.

HTML5

Security issues

Bringing your game to HTML5 means most games will be played on either a web browser or webview.  If on a web browser, there may be some limitations due to the browser security policies. For example, the program can’t play the music/video automatically, so developers need to design a play button or other item to enable the player to interact with the browser.

Graphical Bottlenecks

Bottlenecks can occur especially with how WebGL works currently. This means that the same issues you find with having thousands of different Android phones is at a much bigger magnitude. So optimizing things like how to better use UIWebview and dropping the amount of draw calls is very important.

SDK/API integration

As mentioned above, check to make sure all APIs and SDKs you use in your game are compatible with your HTML5 game.