• Egret is a brand new open mobile game and application engine which allows you to quickly build mobile games and apps on Android,iOS and Windows.


  • Egret Engine

    The Egret Engine includes a game engine that follows the HTML5 standard developed by the Egret. It includes a common module for game engines such as 2D / 3D rendering cores, EUI systems, audio management, and resource management.
    Through the use of Egrets engine, developers can do as much as possible not concerned about the bottom of the browser to achieve, to solve the HTML5 game performance problems and fragmentation issues, flexibility to meet the developer to develop 2D or 3D game needs.

    Platform Coverage




    Install Egret Engine

    After installation, we can easily manage the Egret engine and tools.

    Getting Started


    An Egret project should be developed by TypeScirpt language. TypeScript is a superset of JavaScript, the specific content can refer to the TyptScript language manual. Egret API and AS3 have a lot of similarities. It will be certainly easy to get started if you are familiar with it.

    Create a project by command line

    You can use following command to create a default item for the game

    egret create HelloWorld

    If you have special needs you can add parameters - type empty | game | gui | eui to specify different projects. After creating a game you can see a folder named 'HelloWorld'.

    Write the first line of code

    The entry for the game project is src / Main.ts by default. Write the first line of code for our project below, find the createGameScene () function in the default code, add console.log ("Hello World");

    Become following:

    private createGameScene():void {
            // log
            console.log("Hello World");
            var sky:egret.Bitmap = this.createBitmapByName("bgImage");
            var stageW:number = this.stage.stageWidth;
            var stageH:number = this.stage.stageHeight;
            sky.width = stageW;
            sky.height = stageH;

    Here we call a commonly used debugging command, console.log ("need to display the log content"). It will display our log in the browser's developer tool.

    We recommend using Chrome to debug the Egret project.

    We use the following command to build the project:

    egret build

    Then use the following command line to run the project:

    egret startserver


    For more information, please refer to the Learning Module to view the documentation.


    Tower Defence Demo

    Click here for online experience.<br/>

    Click here for more 2D/3D demos.<br/>

    Show Case

    Click here to see Show Case<br/>


    • Access Doc to get Engine document
    • Access Example to learn demo source code
    • Access API to get API document
    • Access Video to get videos
    • Access Community to communicate with other developers


    Third Party Library


    Raising a good question is the first step to participate a open source community. You can report issues here.
    Issue discussion in official community is recommended. It can help the latters solve problems more efficiently.


    This content is released under the ( BSD License.


与 CodeNavigator -- Read source code on iPad 的连接断开,我们正在尝试重连,请耐心等待