Egretia Engine Upgrade: How to get access to Taobao (Alibaba’s eBay-like online marketplace) Mini Program

Egretia Io
Egretia
Published in
4 min readOct 10, 2020

As Taobao Mini Program goes mainstream, brand owners have a growing need to increase their brand value and gain more users and market share through Alibaba. As such, Egretia engine allows developers to launch the game on Taobao quickly.

Development procedure for accessing Taobao Mini Program

1. Preparation

> Register a retailer account on Taobao

> Download Taobao toolkit

> Call APIs such as game sign-in and user information provided by Taobao

> Egretia engine V5.3.10 or above

> Egretia Launcher V1.2.22 or above

2. The game creation and package

1)Create a game via Egretia Launcher or import the existing project on Egretia

2) After creating or importing is done, it will be shown on the list. Then developers can click the release settings

3) Select Taobao Mini Program to create the game

4) After the creation, developers can click the button to release the game

5) The type of game code: compile the code in the Egretia project into Taobao project;

• debug: js code is not obfuscated by uglify, which is convenient for debugging;

  • release: the uglify obfuscation and compression for js code;

6) Taobao Mini Program structure:

· app.css :files of application, no modification in general

· app.js:register app, to receive the notification of running, display and hiding

· app.json:the configuration file

· js directory:js code of game

· manifest.js:to load dependent js files

· mini.project.json:to configure the files format.(set the special format here)

· package.json:description file

· pages/index files:

· egret.tbgame.js:Adaptation layer code of Egretia

· index.axml:the page of entry

· index.js:entry files

· tools files:tools (no editing)

· resource : resource files such as pictures and audio of the game

3. Download and install

• Download the toolkit

  • Click to select the app for retailer, and then install it on the phone
  • Select the application
  • Associate the application on the upper left and click the real-device test on the upper right. After the compilation is completed, please scan the code for debugging via Taobao mobile APP

4. Notes

1). Due to security issues, the platform does not support the API of my.request network request. However, it supports most of the network request methods through other APIs. If you still have problems with your game, please use cloud development

2). When loading remote resources, the resources must be placed under the domain name of Ali, please consult Taobao’s technical support for details;

3). The text input function provided by the platform is very weak, please test first to check the effect;

4). The created egret.Sound must be destroyed by calling the sound.close() method when it’s not in use;

5). Horizontal screen games is not available;

6). iOS does not support websock real-device debugging, but preview mode can be used;

7). iOS does not support local sound playback for the time being, and the sound loaded on the network is available;

8). You cannot directly call the window object without $global.window;

9). The emulator does not support functions such as sound playback, please refer to the real-device test.

Stay tuned for updates from the Egretia official channels below so that you can be involved in all the exciting things to come!

Egretia Telegram: https://t.me/Egretia

Egretia Twitter: https://twitter.com/Egretia_io

Egretia Website: https://egretia.io/

--

--