How and Why To Develop A WeChat Mini Program or Game
WeChat (parent company Tencent) launched its Mini Programs and Mini Games platform in 2017. In March 2019, Tencent opened its Mini Games platform to developers worldwide.
Why Build a WeChat Mini Program?
WeChat boasts over one billion active users a month. It is the primary source of communication for a whole country, making it the number one app in China. Users maintain their social and professional contacts with it, sharing files and photos. It is the most used mobile payment solution in China, where cash payments are becoming more scarce.
WeChat Mini Programs are an easy way to get your brand into the space because they have:
- WeChat Integration. Users don’t have to download and install anything. They don’t have to log in again if they leave, and your Mini Program or Game can access the user’s WeChat account profiles and friends lists, and use WeChat Pay for purchases. Unlike nearly any comparable program in the Western world, you can safely assume that every Chinese user has a WeChat account and WeChat installed on their device(s).
- Utility & Value. As opposed to a post, ad, or other marketing message, a Mini Program is interactive and promises to allow the user to do something useful, increasing the likelihood a person will install and use it.
- High ability to go viral. While nothing is guaranteed, because they operate within China’s most popular social platform, your app has an increased likelihood of going viral because it can more easily be shared and pop up in front of more eyeballs.Incredibly large user base. With more than 1 billion monthly users, there is no larger app ecosystem in the world outside of Facebook.
- Stability and Manageability. Mini Programs only operate within the WeChat program ecosystem, meaning they will work on any device that has WeChat installed, and users remain the WeChat platform when they are running them. They offer cross-platform compatibility right out of the box.
- Easy support and upgrade threshold. They will be easier to support and upgrade as a result, although we still recommend testing across multiple devices and screen orientations to ensure a consistent user experience.
- HTML5. You can leverage the power of the large, existing HTML5 ecosystem by easily converting HTML5 apps and games into WeChat Mini Games, no matter which game engine you used to develop them. The difficulty depends on the size of your original game and the framework it was based on, since WeChat Mini Programs do have size limits
- Auto-update, which means they are a perfect sandbox for testing out new features, UX variations or interface designs for your native app.
One reason HTML5 games are popular in China is because they carry a lower traffic cost compared to native games, as many gamers on the Mainland still have limited data plans or no wifi access.
How Do Users Find WeChat Mini Programs or Games?
Users enter WeChat Mini Programs or Games primarily through these channels:
- Invitation from friends or WeChat groups
- Scanning a QR code
- Recently accessed programs displayed in the user’s Mini Program history, or after pulling down the chat inbox
- Discover > Mini Program, then search for a Mini Program
- Discover > Games > My Mini Games, then search for “小游戏” (Mini Game)
How Do You Program a WeChat Mini Program or Game?
The three major game engine makers in China support WeChat Mini Games: Cocos Creator, Egret, and Laya. About 50% of the Mini Games on WeChat use the Cocos engine, with the second-most popular being Laya (25%).
For now, popular foreign HTML5 game engines such as Phaser.js, Three.js do not offer direct support, but can still be used with adaptations.
Please note that CSS and DOM cannot be used during development of a WeChat Mini Program or Game. This means you may have problems with some third-party libraries, such as JQuery (which uses the DOM API). Also, available storage space, memory and performance are lower than native apps, so be sure to test extensively for crashes.
Be aware that WeChat Mini Programs don’t fully use the HTML5 standard. It just simulates these interfaces. So it can be better to develop with an engine that knows the limitations of the WeChat development environment and SDK.
How Do WeChat Mini Programs and Games launch?
To improve loading speed, WeChat launches the first-package and a sub-package with a maximum size of 8M. As this is unlikely to be large enough for your game, you will need to host some resource files on your own server.
So to get your program, a user scans your QR code, which will download a small program package from WeChat and complete its code initialization. Then the code in this package will request remote server resources as it executes, finally bringing the user to the first screen in your program or game. This is why it is important to control the size of your Mini Program or Game to get the best user experience and minimize load times.
How are Mini Programs different from Mini Games?
WeChat Mini Games have:
- A dedicated category and entry points inside WeChat’s game menu
- Additional APIs (leaderboards)
How To Get Started – The Hard Way
You will need to create a developer’s account with WeChat to begin developing your WeChat Mini Program or Game.
Note: You must be a Chinese company or individual, or your company must have a Chinese entity (or WFOE), in order to publish a WeChat Mini Program or Mini Game. At this time, overseas companies and non-Chinese individuals can only open either a WeChat Official Service account or Subscription account – neither of which will allow you to develop Mini Programs or Games.
Entities Eligible for WeChat Official Accounts
|Individual||WeChat users aged over 18 with a Chinese ID card and have completed real-name authentication.|
|Company||Companies, branch offices, and business-related brands.|
|Company (Individual Business)||Individually owned industrial and commercial households.|
|Government||All levels and kinds of government agencies, public institutions, and social organizations with administrative functions in China.|
|Media||Newspapers, magazines, TV stations, radio stations, and news agencies, etc.|
|Other organizations||Other entities that do not fall into the government, media, company, or individual categories.|
1. Register Your Developer Account and Open A New Project
- Go to the official WeChat account registration page.
- Select “Mini Programs” and enter the required information to set up your account. If you are registering a game, select “Game” as the service category and “Casual Game” as the subcategory.
- You will need to submit the required documents and licenses. Note that the same licenses you need for publishing a native app will be required for your WeChat Mini Program or App as well. For example, as your server will be in China, you will need an ICP beian at the very least.
- A 300RMB fee will be required to verify your company identity with WeChat.
- Approval of your official developer’s account generally takes 1-3 days. You will be contacted for additional documentation if your application is rejected.
- Once approved, download the developer tools according to your operating system platform from the official WeChat Developer’s website.
- In the Mini Program Management backend, register your mini program to get its AppID.
- Open the WeChat development tools, and input the corresponding AppID and project name to start your project.
- If your Mini Program or Game needs to accept payments, you must go through the process to register and verify a WeChat Pay account before you can integrate payments into your app.
2. Create your code files and begin programming.
- js script logic file. This is the primary code file, the same as the PHP code file on the web, or Java code for Android apps.
- Layout WXSS file, used to write the page layout. This is equivalent to XML layout code in android development, HTML code in web development, is used to write page layout.
- WXSS files. This is the equivalent of CSS in web development, used to style the pages of your app.
- On WeChat’s official website, you will find some official tutorials and the API documentation.
3. Submit Your Mini Program or Game For Approval
After your Mini Program or Game is complete, submit it to the WeChat team for review and approval. The approval process usually takes 1-3 days.
Note that the same laws and content restrictions that apply to native apps in China also apply to WeChat Mini Programs and Games.
How To Get Started – The Easy Way
AppInChina can quickly develop and publish a WeChat Mini Program for you, based on your specifications and needs. We can also streamline and help you avoid some of the paperwork and documentation normally required, while you retain full rights to your Mini Program. Depending on your needs, Mini Programs can be developed in as little as as 1-2 weeks. Contact us below for a quick custom quote.