Phaser Open source 2d engine HTML5 game Frame Chinese Introduction

Source: Internet
Author: User

Functional Features (Features)

Maintainable code (easy Asset Loading)

Phaser can load images, audio files, data files, text files and automatically parse sprite and texture Atlas data (export texture packer or flash CS6)

Screen (cameras)

To view your game window, you can have multiple cameras, each camera can be divided into a unique size area, anywhere on the screen, or window size, zoom and rotate, and have camera effects such as shaking, flashing and fading. They can also customize the blind area according to the elves.

Sprites and Game objects (Sprites and Gameobjects)

Phaser the physical properties of the built-in game objects, including speed, acceleration, elasticity, and resistance. They can be scaled, rotated and collided together. The Scrollfactor property allows them to have some beautiful parallax effects, and the screen scrolls at different speeds.

Group (Groups)

Groups allow you to easily recycle objects (for example, to facilitate the launch of ammunition) to bind game objects together. Groups can also collide with other groups or elves. You can also quickly set the visibility of all sub-groups and call functions.

Animation (Animation)

Animate sprites are supported regardless of the sprite table or texture Atlas data (JSON array format). Animation playback controls, including loops, an FPS based timer and custom frames.

Scrolling zone (Scroll Zones)

Scroll the area and can scroll seamlessly in any direction in any image. Alternatively, you can create multiple scrolling areas within a single image. Constantly recycle useful game backgrounds and effects.

Collision (collision)

There is a quad-tree sprite, Sprite, Sprite set or collection collision system. And a lot of geometric intersection methods (lines and lines, lines and circles, circles with rectangles and polygons).

Granules (particles)

The phaser comes with a basic trigger class that lets you emit sprites under your control. Whether the particles are triggered in bursts or at a steady speed. Particles can bounce, rotate, scale, and have their own life-cycle values.

Inputs (input)

has local keyboard, mouse and Touch processing (Mspointer event coming soon)

Stages (stage)

The stage is your game life. You can easily change its position in the browser, width, height, background color (transparent background, have your game) and Stagescalemode inside.

Window (World)

The window is the center of your game. This is the living area of all the game objects, particles and other objects. The window can be any size and the object is positioned inside it. You can use the screen to view the window.

Voice (sound)

Currently, Phaser uses a basic Webaudio implementation for playback. There's a lot of work to do in this area, but because it means you can load and play music and effects.

Status Management (state Management)

For larger games, it is very useful to enter the game state down into states, which is the main menu, Level 1, Gameover,phaser support for state management JavaScript and typescript. Or, you can ignore the state to completely establish several core features of your game.

Caching (Cache)

All loaded resources are stored in an easy-to-access game cache, and it can be cleared between state changes

or by sticking to the whole game.

Map of Dogger (Tilemaps)

Phaser a multi-grid map that resolves locally to CSV tilemap data or JSON interfaces. It supports layered tiling, layer visibility and layer-based collisions, so you can tilemap in an invisible tilemap layer if you want your elves to collide.

Games Scaling (game scaling)

The game is scaled under your control. Easily remove the url/status bar from Mobile Brpwsers (iOS and Android) and enable scaling, fixed size and orientation checks.

Working in progress (work in Progress)

Some of our features we know phaser lack, here is our current priority list:

1. Better sound Control (audio sprites, panning, loops)

2, Mspointer support

3. Text rendering (bitmap font, canvas text, angelfont,glyph design)

4. Buttons and other basic UI

Beyond this, there are a lot of other things we plan to add, such as WEBGL support, support, Spine/spriter's animated format supports, tilt collision multi-lattice, path-finding, and support for custom plugins. However, the above list of priority items is by no means exhaustive! However, we feel that the core structure of phaser is now tightly locked, so it is safe to use and create a small game of a certain size.

Testing Suite (test suite)

Phaser's growing test suite. Personally, we better learn to look at small finished code examples, so we create tests for each new feature, adding a lot of them. "Test" folder inside, you will find the current settings. If you have written a particularly good test, then please send it to us.

Running tests requires a local Web server (from your browser to avoid file access errors).

Make sure that through your Web server, you can browse to the tests folder. If you have PHP installed, then start:

Test/index.php

The test suite now requires PHP, but we will remove this rule as soon as possible.

You can also browse Phaser's online test suite.

Contribution (contributing)

Phaser is in the early stages, although we still have a lot to add to it, and we want to get it out there and share it with you.

If you find a bug (most likely), please report it on GitHub.

If you have functional requirements, or have written a small game or demo that shows the use of phaser, then please contact us. We'd love to hear from you. Phaser part of the HTML5 Game development Team Forum or post a comment on this site, you can do it.

Error? (Bugs)

Please contact with as much information as possible and submit them to GitHub for issue tracking.

Phaser Open source 2d engine HTML5 game Frame Chinese Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.