Choosing a Fast WebGL Sprite Renderer

Started by
2 comments, last by Madhed 10 years, 1 month ago

Greetings Gamedev.net! I am interested in some opinions on WebGL sprite rendering frameworks.

So far, I have been developing some prototypes in libgdx, and now I want to start my main game project using JavaScript and WebGL (I am aware of the libgdx GWT backend, but since I'm using Box2D for my game's physics, which is provided as a native library, it obviously doesn't work in browsers; moreover, I'm not especially interested in publishing the game as a standalone PC app or on Android).

I have been researching WebGL 3D engines (most of which obviously support 2D graphics), but I'm not quite sure which would be the right one for my game. Three.js seems to have sprite support, but I'm not sure how well it performs (I couldn't find any benchmarks).

My game is 2D, and I would therefore need a speedy sprite rendering system, such as libgdx's SpriteBatch that can handle a very large number of sprites (including particles). I am not looking for canvas support - just WebGL is fine.

I am interested in suggestions regarding a fast, simple WebGL sprite rendering solution, be it in a dedicated framework, or as part of a general 3D engine. It should also be relatively mature and actively maintained (since WebGL is still in its infancy and is thus rapidly changing).

If no suitable solution exists, I guess I'll end up just rolling my own and open-sourcing it!

Advertisement

Have a look at Pixi.js. It supports WebGL and falls back automatically to canvas. And it's pretty fast.

Here's a Benchmark: http://www.goodboydigital.com/pixijs/bunnymark/

60 FPS with 25k bunnies on-screen on my 3-year old laptop GPU.

Not bad pixi, not bad at all. Moreover, it seems to be really unintrusive and lightweight. It's pretty much exactly what I was looking for. Thank you!

Edit:

By the way, here's the official website: http://www.pixijs.com/

They also have a nice example of pixijs working together with Spine2D (http://esotericsoftware.com/): http://www.goodboydigital.com/pixijs/examples/12/

Yeah i was pretty impressed myself. I think its really well designed.

This topic is closed to new replies.

Advertisement