Before using CSS3 to draw a bar??, that was a year ago, this time I spent a day to study the Pixi.js, a WebGL-based 2D game engine, and then use it to do a demo out, metamorphosis version feeding frenzy.
Demo Address: Perverted version feeding frenzy
This is a H5 Game Rankings, I am most optimistic about Pixi, just started also tried create.js, but it does not support WebGL, this is a mishap, and then understand the phaser, based on Pixi development, the function is certainly more powerful than Pixi, but I think it is too heavy, it seems to be more than 500 k , is not suitable for small games, and Pixi only 90K, and support WebGL, so we chose it.
Refer to the official API try to do a feeding frenzy demo, first on a
Pixi gives us a set of APIs that we don't need to relate to the underlying and don't need to know about WebGL, the effect is awesome.
First talk about the game and development ideas
Play: Keyboard up or down
1, creating objects that roam in the page
2, listens each frame, transforms the position to each object, and processes the status of the protagonist (eating fish and being eaten)
3, followed by the end of the game to deal with
Source code on my GitHub, but inconvenient to open, want to download the code can be directly from my demo URL to unplug.
Perverted version feeding frenzy-based on pixi.js 2D game engine