Unity 3D vs libgdx: 2D performance



Did you read my previous post about 2D frameworks for Unity 3D? I was curious how their performance compares to my favourite framework for game development: libgdx.

Again, I tested everything on my Xperia Play (on iOS you'd get roughly similar performance using an iPhone 4). My test consists of a single background sprite (640x960 px, static) and three animated sprites (all frames were packed into a single atlas texture to reduce draw calls).
Every touch spawned 10 sprites, every second touch spawned another 100 sprites (randomly selected from these three types). Sprites go from the top of the screen to the bottom of it and are deactivated and reused later (except for the libgdx test, read below). Here are the results:

Sprite countOrthello 2Dex2DSpriteManager 1SpriteManager 2libgdx
5057 fps60 fps60 fps60 fps60 fps
10018 fps60 fps60 fps60 fps60 fps
1506 fps58 fps60 fps60 fps60 fps
2004 fps52 fps60 fps60 fps60 fps
3001 fps35 fps60 fps58 fps60 fps
5001 fps22 fps58 fps52 fps60 fps
10001 fps11 fps45 fps39 fps60 fps
1500-6 fps33 fps-59 fps
2000-4 fps26 fps-43 fps
3000--17 fps-33 fps

It's worth noting that the libgdx version was built in a rush and I didn't try very hard to optimize it (the sprites aren't even deactivated/reused, because LAZY). Still, the performance is pretty great - that's one of the reasons why I love libgdx!

57 Response to "Unity 3D vs libgdx: 2D performance"

Prześlij komentarz

Powered by Blogger