A Dart Game Engine (Phaser port)

415 views
Skip to first unread message

王廷軒

unread,
Aug 13, 2014, 12:15:37 AM8/13/14
to mi...@dartlang.org
Hi,
This is my first post on this group, and English is not my native language. Please correct me if I made any mistake.

I have developed a game engine play_phaser which is a Dart port of Phaser.

Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses pixi internally for fast 2D Canvas and WebGL rendering.

Currently, almost all features are implemented.

And a set of examples selected from official website were built to test my play_phaser.

The document is not ready, but you can check the document form original Phaser website. I tried to make the two APIs as consistent as possible.

I would love to see anyone trying my play_phaser  game engine, and please give me any feedback.



Features

WebGL & Canvas

Phaser uses both a Canvas and WebGL renderer internally and can automatically swap between them based on browser support. This allows for lightning fast rendering across Desktop and Mobile. When running under WebGL Phaser now supports shaders, allowing for some incredible in-game effects. Phaser uses and contributes towards the excellent Pixi.js library for rendering.

Preloader

We've made the loading of assets as simple as one line of code. Images, Sounds, Sprite Sheets, Tilemaps, JSON data, XML and JavaScript files - all parsed and handled automatically, ready for use in game and stored in a global Cache for Sprites to share.

Physics

Phaser ships with our Arcade Physics system,which is for high-speed AABB collision.


Sprites

Sprites are the life-blood of your game. Position them, tween them, rotate them, scale them, animate them, collide them, paint them onto custom textures and so much more! Sprites also have full Input support: click them, touch them, drag them around, snap them - even pixel perfect click detection if needed.

Groups

Group bundles of Sprites together for easy pooling and recycling, avoiding constant object creation. Groups can also be collided: for example a "Bullets" group checking for collision against the "Aliens" group, with a custom collision callback to handle the outcome.

Animation

Phaser supports classic Sprite Sheets with a fixed frame size, Texture Packer and Flash CS6/CC JSON files (both Hash and Array formats) and Starling XML files. All of these can be used to easily create animation for Sprites.

Particles

An Arcade Particle system is built-in, which allows you to create fun particle effects easily. Create explosions or constant streams for effects like rain or fire. Or attach the Emitter to a Sprite for a jet trail.

Camera

Phaser has a built-in Game World. Objects can be placed anywhere within the world and you've got access to a powerful Camera to look into that world. Pan around and follow Sprites with ease.

Input

Talk to a Phaser.Pointer and it doesn't matter if the input came from a touch-screen or mouse, it can even change mid-game without dropping a beat. Multi-touch, Mouse, Keyboard and lots of useful functions allow you to code custom gesture recognition.

Sound

Phaser supports both Web Audio and legacy HTML Audio. It automatically handles mobile device locking, easy Audio Sprite creation, looping, streaming and volume. We know how much of a pain dealing with audio on mobile is, so we did our best to resolve that!

Tilemaps

Phaser can load, render and collide with a tilemap with just a couple of lines of code. We support CSV and Tiled map data formats with multiple tile layers. There are lots of powerful tile manipulation functions: swap tiles, replace them, delete them, add them and update the map in realtime.

Device Scaling

Phaser has a built-in Scale Manager which allows you to scale your game to fit any size screen. Control aspect ratios, minimum and maximum scales and full-screen support.

Plugin system

We are trying hard to keep the core of Phaser limited to only essential classes, so we built a smart Plugin system to handle everything else. Create your own plugins easily and share them with the community.

Mobile Browser

Phaser was built specifically for Mobile web browsers. Of course it works blazingly fast on Desktop too, but unlike lots of frameworks mobile was our main focus. If it doesn't perform well on mobile then we don't add it into the Core.

Developer Support

We use Phaser every day on our many client projects. As a result it's constantly evolving and improving and we jump on bugs and pull requests quickly. This is a living, breathing framework maintained by a commercial company with custom feature development and support packages available. We live and breathe HTML5 games.


Dennis Kaselow

unread,
Aug 13, 2014, 2:16:06 AM8/13/14
to mi...@dartlang.org
Awesome work.

Are you planning to participate in the next Ludum Dare? http://www.ludumdare.com/compo/

I'd like to see some game made with it.


--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

王廷軒

unread,
Aug 13, 2014, 7:55:37 AM8/13/14
to mi...@dartlang.org
It looks fun. I will try it, thanks for the information.
The Phaser game engine is definitely suitable to create games in very short period of time.

Dennis Kaselow

unread,
Aug 13, 2014, 11:42:31 AM8/13/14
to mi...@dartlang.org
If you want to take a look at other Dart games submitted for a Ludum Dare, I've compiled a list of all Dart games made for the last two Ludum Dares:
https://plus.google.com/105286508797924533780/posts/SzpFbNAwfL5
https://plus.google.com/105286508797924533780/posts/4bSY58vwrPa

Looking forward to an even longer list this time :)

It can be stressful, but it's quite fun to create a game in just 48 hours :).
Reply all
Reply to author
Forward
0 new messages