Ejecta memory management testing

Discussion and feedback on Construct 2

Post » Mon Apr 28, 2014 12:01 pm

No WebGl shaders used, I know to avoid them for mobiles, but my games have a lot of particles, which run fine with Android with WebGL enabled even on older devices.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Apr 28, 2014 12:07 pm

@Silverforce - what's the performance difference between canvas2d and webgl and can you share a .capx demonstrating that? Is it the same across iPhone models (4S, 5...) and iPad?
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Mon Apr 28, 2014 12:33 pm

Ashley wrote:@Silverforce - what's the performance difference between canvas2d and webgl and can you share a .capx demonstrating that? Is it the same across iPhone models (4S, 5...) and iPad?


I've only tested on 4S, dont have other Apple devices.

https://play.google.com/store/apps/deta ... free&hl=en

On Android (with CJS) this simple shooter runs flawless on devices from 2010, HTC Incredible with a 1ghz old dual core. On iOS with Ejecta or CJS it lags everytime there's explosions with particles (which happen frequently!), while it doesn't lag with WebGL disabled. Do you have an email (PM) I can send the CAPX to?

Edit: Since we're on this topic, is there a technical reason why WebGL shaders are just horrible on mobiles? I mean take a look at this: https://play.google.com/store/apps/deta ... mes.xcomeu

Awesome game runs very smooth on my Snapdragon S600 device (equivalent to Nexus 7). Surely, a few fancy shader effects should be OK but sadly its not. 10 glowing tiny sprites = lag fest. Or 2-3 warp sprites = lag fest.

is it NOT GPU accelerated and all processed on the CPU only? I can't see another reason for it, these newer SoCs have a lot of GPU grunt.
Last edited by Silverforce on Mon Apr 28, 2014 12:55 pm, edited 2 times in total.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Apr 28, 2014 12:39 pm

@Ashley: usage on the flat parts is while running the layout (=playing the game). Spikes is when switching to another layout. The problem with those big spikes is that my app receives memory warning... and sometimes iOS decides to close the app...
B
6
S
1
Posts: 18
Reputation: 450

Post » Mon Apr 28, 2014 12:42 pm

@sylva1n

If its on an older iPad or 4S, if you hit 200mb memory use, the app can close since it generally only have that much free out of the 512mb of ram. Spikes doubling vram even temporary is a no-no for mobiles.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Apr 28, 2014 1:14 pm

@Silverforce - WebGL shaders *are* GPU-accelerated, but mobile GPUs are just a lot weaker. 3D games render differently and can actually have considerably less overdraw than 2D games, making them faster in some cases. Some shaders are also slower than others (e.g. blur and water shader can be slow, but most blends are fast).
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Mon Apr 28, 2014 3:17 pm

Mobile GPUs these days aren't that weak, an example is a Snapdragon 800, it compares well to intel GPUs in notebooks U models with HD4000 and AMD APU such as A6/8 in notebooks. Those notebook chips (I've tested via Chrome on a windows 8 ativ smart pro with i5 CPU) actually run WebGL shaders fine. There is something else going on there.

For comparison purposes: http://www.futuremark.com/hardware/mobile

As we can see, new mobile SoCs is catching up pretty fast to intel ultrabook level.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Apr 28, 2014 9:11 pm

@Silverforce : you're right --> iPhone 4S. If ever this memory management is integrated in the master branch of next Ejecta releases, my game is dead :-(
B
6
S
1
Posts: 18
Reputation: 450

Post » Mon Apr 28, 2014 9:21 pm

@Silverforce - have you tested WebGL shaders on a device with a Snapdragon 800 or newer? They should have decent performance. Something as old as the iPhone 4S on the other hand will struggle.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Tue Apr 29, 2014 12:08 am

@Silverforce

Pixel shaders are intensive even on desktop gpus. There are some differences you should be aware of:

Mobile gpus use a fixed structure where a shader processing unit can only perform one task. On desktop gpus, they can perform multiple tasks. This means that mobile devices have even weaker pixel shader performance than you'd expect comparing the GFLOPS, and 3dmark, as I understand it, isn't a good measure for just comparing pixel shader performance alone.

Tegra 3 has 12 shader units, 8 are for pixels, 4 are for vertex (12 GFLOPS, 1.04 gigapixels per sec pixel fill rate)
Tegra 4 essentially has 72, 48 are pixel shaders and 24 are vertex units (43.2 GFLOPS, 2.68 gigapixels per sec pixel fill rate)
iPhone 5s - couldn't find number of shader units, but performs at 76.8 GFLOPS
My 9800gt has 112 multipurpose units (504 GFLOPS, 9.6 gigapixels per sec pixel fill rate)

This means that even top level mobile gpus still don't even come close to my 9800gt, which is basically a rebranded 8800gt, that was released in 2007. A tegra 4 has less than 9% of the GFLOPS, compounded by the fact that 1/3 of its shader units can't be used for pixel shaders. They might seem powerful lately, but mobile gpus are really still quite weak.

As I recall, my 9800gt can't even handle somewhere around 50 small sprites with the tint effect applied to them at 60 fps. Pixel shaders are crazy intensive, so it's no surprise that mobile can't handle them all that well.
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests