Giter VIP home page Giter VIP logo

egret-core's Introduction

forks stars version license

EN / CN

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

Mobile

PC

Installation

Install Egret Engine

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

Getting Started

TypeScript

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");
        this.addChild(sky);
        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

Done.

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

Demo

Tower Defence Demo Click here for online experience.

Click here for more 2D/3D demos.

Show Case

Click here to see Show Case

Learn

  • 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

Tools

Third Party Library

  • Use base64texture to convert base64 String to egert Texture
  • Use dcagent DataEye SDK for Egret
  • Use ecs component system
  • Use euiextension EUI extension
  • Use gesture Gesture library
  • Use keyboard Keyboard event listener
  • Use Greensock Greensock animation library
  • Use jszip jszip Compression library
  • Use md5 A simple MD5 Library
  • Use mouse PC mouse support library
  • Use particle particle system
  • Use physics p2Physics engine,current version 0.7.0
  • Use socket socket.io
  • Use tiled tiledmap support library
  • Use weixinapi WeChat API
  • More third party libraries please visit here

Contributing

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.

License

This content is released under the (https://opensource.org/licenses/BSD-2-Clause) BSD License.

egret-core's People

Contributors

akdcl avatar babyzone2004 avatar d8q8 avatar dashaomai avatar domchen avatar eos3tion avatar f111fei avatar h-wei avatar himuil avatar imzc avatar jackyanjiaqi avatar jkd2972 avatar lijianegret avatar mebiusashan avatar necroneco avatar neoguo avatar rockyf avatar runinspring avatar shawn0326 avatar shawnli-bj avatar sucresk avatar superlancelot avatar wanderwang avatar webreldesigner avatar wibrst avatar xrdavies avatar xsstomy avatar yjtx avatar zerlot avatar zrong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.