Overview
Framework
Binance Mini Game framework is base on Binance Mini Program, currently support development using Javascript. The framework provide high performance 2D/WebGL rendering capabilities, it also has browser-like canvas APIs. It's very convenient to migrate existing HTML5 games mini-game.
File Structure
The mini-game project consists of three files that must be placed in the same directory.
File | Required | Role |
---|---|---|
game.js | yes | Game logic entry |
game.json | yes | Game global settings |
project.config.json | yes | Project settings |
The game.js file is the entry point of the game logic. The project.config.json is used to describe the entire project, for details, please refer to Project Configuration. The game.json is used to describe the game settings, for details, please refer to Game Configuration.
All code written by the developer will be compiled and packaged for uploading to the mini program backend, and then sent to the app runtime to run. A typical project directory structure is as follows
.
├── assets/
├── src/
│ ├── preload.js
│ └── scene.js
├── game.js
├── game.json
└── project.config.json