3d Performance in mobile

352 views
Skip to first unread message

Pier Bover

unread,
Aug 24, 2013, 6:50:41 PM8/24/13
to haxe...@googlegroups.com
So, if I understand correctly, when I compile for iOS I'm compiling in C++. So in theory, considering there's no virtual machine, performance in general should be way better than Adobe Air. Right?

What about 3D performance? Are there any benchmarks or apps out there so we can see the performance we could get in mobile?

Joshua Granick

unread,
Aug 25, 2013, 1:36:14 AM8/25/13
to haxe...@googlegroups.com, Pier Bover
This is a good link if you haven't seen it before:


That's comparing the engine in OpenFL (and before it, NME) against various Stage3D libraries.


On Sat, 24 Aug 2013 15:50:41 -0700, Pier Bover <pierb...@gmail.com> wrote:

So, if I understand correctly, when I compile for iOS I'm compiling in C++. So in theory, considering there's no virtual machine, performance in general should be way better than Adobe Air. Right?

What about 3D performance? Are there any benchmarks or apps out there so we can see the performance we could get in mobile?
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.



Philippe Elsass

unread,
Aug 25, 2013, 2:16:26 PM8/25/13
to haxe...@googlegroups.com, Pier Bover
When targeting AIR for iOS, ActionScript is compiled to native code too (like Unity3D; it's called AOT), and in general it will be a bit slower than the equivalent code in Haxe's C++.

However performance depends on many factors, like the quality of the code (good use of strict typing), the complexity of the computations (in both cases it's not as good as pure C++), the way you manage assets and memory, and most of all, how efficiently you use the graphical API. 

One weakness of AIR is that using Stage3D frameworks like Starling is very CPU intensive (lots of computations), and this is usually why AIR is behind OpenFL in 2D benchmarks, but OpenFL won't magically make everything faster if you don't use it right.

Another advantage of OpenFL is a lighter runtime which allows you to create apps that load faster.

--
Philippe

Pier Bover

unread,
Aug 25, 2013, 2:31:11 PM8/25/13
to haxe...@googlegroups.com, Pier Bover
Thanks for the link.

What about "real" 3D performance? Polygons, shaders, etc.

Pier Bover

unread,
Aug 25, 2013, 2:49:29 PM8/25/13
to haxe...@googlegroups.com, Pier Bover
Excuse my ignorance, but then why is Unity able to run more polygons and shaders than Adobe Air for mobile if both are running with native code?

I have seen many Unity games for mobile such as Shadowgun that deliver amazing 3d graphics, and clearly Adobe Air can't pull out that kind of performance.

Philippe Elsass

unread,
Aug 25, 2013, 2:59:33 PM8/25/13
to haxe...@googlegroups.com, Pier Bover
The differences between Unity3D and AIR are:
- the C# language features stricter and better typing, which means better AOT,
- Unity3D has a rich 3D graphical API as part of their runtime and which is a lot more optimized than what you can write in AS3 (or even Haxe for that matter).

OpenFL's 2D API is fast because it is implemented fully in C++ (in OpenFL runtime) and exposed to Haxe in an efficient way.

Pier Bover

unread,
Aug 25, 2013, 3:02:57 PM8/25/13
to haxe...@googlegroups.com, Pier Bover
"OpenFL's 2D API is fast because it is implemented fully in C++ "

What about 3D?

Samuel Batista

unread,
Aug 25, 2013, 3:17:38 PM8/25/13
to haxe...@googlegroups.com, Pier Bover
OpenFL exposes an OpenGL context, which allows you to implement highly optimized 3D rendering code if you desire. But doing so requires sacrificing the flexibility of using the display list that makes developing applications using flash / openfl so quick and easy.

Philippe Elsass

unread,
Aug 25, 2013, 3:18:38 PM8/25/13
to haxe...@googlegroups.com, Pier Bover
OpenFL now exposes the OpenGL API to Haxe in a low level way, which is pretty similar to Stage3D, but without engines like Away3D/Minko/Flare3D/etc. to make it easily usable like Unity3D is.

Arguably to compete with Unity3D, OpenFL would need to expose a complete C++ 3D engine to Haxe. There was some work to integrate http://gameplay3d.org/ but I don't know how far it went.

Pier Bover

unread,
Aug 25, 2013, 5:08:49 PM8/25/13
to Philippe Elsass, haxe...@googlegroups.com
Thanks for your answers.

I think considering performance, practicality, etc., Unity still seems the best option for indie mobile 3D games (as much as I hate their component way of making things).

Certainly Haxe and Flash engines (Flare, Away, Yougurt, etc) have it's place in the browser/desktop world of 3D games. There's no question to me that for 2D games (in any playform) Haxe/Air/Flash are by far the best options. 3D is a different thing altogether, specially when you take into account collisions, physics, particles, etc.
--
Pier Bover
y...@pierbover.com

Nicolas Cannasse

unread,
Aug 29, 2013, 3:40:05 AM8/29/13
to haxe...@googlegroups.com
Le 25/08/2013 20:31, Pier Bover a �crit :
> Thanks for the link.
>
> What about "real" 3D performance? Polygons, shaders, etc.

These are mainly dependant on the hardware and drivers, you could use
even PHP and still get the same FPS as C++ if you're only making a few
calls to the low level 3D API.

Best,
Nicolas



Reply all
Reply to author
Forward
0 new messages