Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Frame Rate when build for xcode sim or device
Started by richard770 Oct 13 2013 03:27 AM

148 replies to this topic
[TOPIC CONTROLS]
« Page 6 of 6 4 5 6
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#126

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

I'm experiencing extreme slow performance when testing my app on iphone 3gs ( ios 6 ). It runs fine on Corona Simulator though.

I hope there will be a lot of optimization coming for graphics 2.0. can't use the app like that :(

 

compatibilitymode is on because it's too huge to replace all referencepoints, gives me a headache...

 

just using some containers and snapshots with blur filter effect.

 

will compatibilitymode slow the whole thing down a lot?



[TOPIC: post.html]
#127

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

latest build ( 2016 ) doesn't really do a lot for me. maybe a bit faster.. could be placebo.

 

but my sprite ( which is quite huge ) looks really ugly / distorted now.



[TOPIC: post.html]
#128

cublah

[GLOBAL: userInfoPane.html]
cublah
  • Contributor

  • 379 posts
  • Corona SDK

You can't compare simulator to device, the Mac or PC has a lot more memory and power especially against a 3gs

[TOPIC: post.html]
#129

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

yeah I thought that too after writing..

still graphics 2.0 makes the app slow down like crazy..



[TOPIC: post.html]
#130

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

OK, I'm on a brand new setup all around:

 

OSX Mavericks 10.9

Xcode 5.0.1

Corona G2.0 build 2013.2016

iPhone 4 (iOS 7.0.3)

 

The frame-rate problems that I saw on my iPhone 4 are gone. The test project I created runs smoothly, as does a production app that had problems with earlier versions of G2.0.

 

Looks like the performance tuning helped :D.

 

@CineTek, @richard770:  What are your verdicts?



[TOPIC: post.html]
#131

zrm310

[GLOBAL: userInfoPane.html]
zrm310
  • Enthusiast

  • 37 posts
  • Corona SDK

Awesome!

 

I tried build 2013.2017 for one of my projects and on an iPhone 4 with iOS 7.03 I'm getting comparable frame rates to what I was getting with G1.0. It's running at 30FPS now whereas a couple builds ago it was at 10FPS.

 

A new issue seems to have crept in where scaling fill images look different in the simulator vs. device. But I'll play around with it to see if its really a bug.



[TOPIC: post.html]
#132

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

I'm not checking for framerates but it doesn't get much better on my 3gs. It's still very slow..



[TOPIC: post.html]
#133

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

We're looking into the scaling issue.

 

@roman85

Can you submit a sample app? Is the same application more performant under the Graphics 1.0 SDK or roughly the same?



[TOPIC: post.html]
#134

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

Hi Bryan,

 

The App is very performant under Graphics 1.0. I think it is still quite performant with graphics 2.0 but as soon as I add two or three text-shadows with the function you can see below it slows down tremendously. But: The app is consistent of many different views and I swipe through them, so it's quite complex all in all.

 

Sorry I can't fill a bug report because I can't send you the code unfortunately. My boss would be very mad at me ;)

 

function addShadow(obj, fontname,size,opacity,blur)

	local blurLevel = blur or 1
	local opacity = opacity or 1

	local snapshot = display.newSnapshot(obj.contentWidth + 20, obj.contentHeight + 20)

	local objSH = display.newText(obj.text,0,0,fontname,size)
	objSH:setFillColor(0,0,0)

	snapshot.group:insert(objSH,true)
	snapshot.fill.effect = "filter.blurGaussian"
	snapshot.fill.effect.horizontal.blurSize = 40 * blurLevel
	snapshot.fill.effect.horizontal.sigma = 2 * blurLevel
	snapshot.fill.effect.vertical.blurSize = 40 * blurLevel
	snapshot.fill.effect.vertical.sigma = 2 * blurLevel

	snapshot.alpha = opacity

	return snapshot

end

local newText = display.newText('hello',0,0,'Helvetica',18)
newText.x = display.contentWidth / 2
newText.y = display.contentHeight / 2

local newTextSH = addShadow(newText, 'Helvetica', 18, 0.5, 2)
newTextSH.x = newText.x
newTextSH.y = newText.y


[TOPIC: post.html]
#135

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

OSX Mavericks

Corona SDK 2013.2021

 

I can confirm that by adding a text object with the shadow function above to my test project slowed things down like crazy.

I will submit a new bug report with the new code.

 

My sample app is set to 60fps.

(Average fps rate measured with Xcode Instruments' Core Animation template)

 

Results:

41fps avg: iPad mini (iOS7.0.3)

6fps avg:  iPod Touch 4th generation (iOS 6.1.3)

22fps avg: iPhone 3GS (iOS 6.1.3)

30fps avg: iPod Touch 3rd generation (iOS 5.1.1)

 

Again you can see some weird behavior for 4th generation devices. Much slower than 3rd generation.



[TOPIC: post.html]
#136

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

Reported as Case 27304



[TOPIC: post.html]
#137

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

@ingemar: thanks that's great



[TOPIC: post.html]
#138

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Hi guys, sorry I was away for a few days...

 

Im afraid to say, my Pro subscription expires tonight! And I have decided I am not resubscribing while G2.0 is in transition, as I feel I would be "paying" to basically beta test for the next couple of months... not getting anywhere with my latest game... and even after that, it still may not deliver what I expect as a paying PRO subscriber.

 

I am trying to make a very simple 2D game, for which I hoped I could use custom shapes to create the terrain for each level. I see this in many other 2D games..... Simply draw the terrain, fill with a tileable texture... set the stroke.. voila! Really nice custom made terrain, easily tweaked and retested.. physics body data matching shape data!!. No need to redraw and export from illustrator or inkscape.. no need to reimport to texture packer or sprite helper, no need to tweak in physics editor or levelhelper... etc etc

 

Sounds like this should be very simple now that we have newPoly and the ability to fill with an image! I have waited a long time for this, and its a great selling point for our amazing SDK.. another thing you can do 10x faster than other SDKs.???

 

But how do I create my custom shapes and add physics to them you ask???? Well, it seems I need alot of 3rd party tools to cater for Coronas shortcomings these days.. and this is still no different.... and most of which are not free.. some are even looking for annual subscription fees now!!! AND currently most  do not support this newPoly feature yet, and won't support it until G.2.0 is available as a stable public release.

 

So Im afraid, what I thought I was getting from Graphics 2.0... will not be available to me for some time, or maybe never. What I need from a 2D game development SDK is not being provided... Maybe the focus is on 2.5D now,, even though theres alot of basic 2D features still missing.

 

I am pretty dissappointed by the whole thing now. For the new price, I expect a level editor.. Im sure that was mentioned in the past... that supports object placement and bezier shape creation with physics. Sheesh!, Even just give us a way to draw bezier shapes and add physics to them!! Its wouldnt be that difficult...

 

Sorry for the rant, but I really am fed up looking for 3rd party tools to do simple things that Corona should do!

 

Keep up the hard work beta testers... mayeb Corona will one day become the all encompassing SDK it should be.

 

Cheers



[TOPIC: post.html]
#139

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

@richard770 fair enough.

 

I absolutely get your point and feelings about this.

The thing is I really don't know if that's possible or not what you're looking for so I can't really give any statement to that.

 

I think the people working at Corona are all great people and programmers, putting so much work into this. But I'm also a bit critical about the development of this product. Look how fast trends are evolving, new OS' are coming out all the time thus new features. It's probably just this incredibly difficult part of it's own nature - to be a tool that operates every other.

 

I'm still trying to fix tableViews and scrollViews on my own. Those were never fully brought to an end. And this is a thing that reminds me a bit of Microsoft (sorry pals): Doing something with some shortcoming here and there and saying "well we'll fix this bug later". In fact: you never will. Microsoft made a statement recently that they're afraid of a super astable Kernel as a result of that. Apple in their best years released products that were absolutely rock solid and fundamentally stable. That's what their success is build on.

 

Another point is: I don't understand why I'm as a developer are not allowed to develop plugins just because I'm not on enterprise. Doing exactly this stuff that everyone is talking about and they don't have time for. And I think the community of Corona is the key for their long term success. Because it's all about content. Make a plugin store where we can buy and sell plug ins.. Everyone would benefit from that.

 

No hard feelings, but you know maybe the leadership of Corona is super happy because they got great sponsoring, a lot of budget and great feedback that would prove that I'm all wrong. ;)

 

My subscription lasts another year and I will stick with what I have. I like Corona and I like the idea behind it.

After that we'll see. If you don't want to pay for the beta testing which is understandable then just wait, look around.

But I recommend you to come back to take a look at Coronas Public Release in half a year or so again.

 

But back to the topic ;)



[TOPIC: post.html]
#140

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Hey @ronman85

Yes, I hear ya... I am not walking away from Corona.. Ive spent too long and invested too much time to date to become proficient in it. I do enjoy developing with it... But I think I will go with the FREE Starter edition until they sort out some issues. I just can't justify paying the PRO subscription to beta test and maybe not even get what I need. And I do understand each of us have different requirements and expectations, and the guys at Corona cant meet them all immediately. But I do think what I am asking for is something that we should have by now. That I do feel strongly about.

So Im afraid Im out of the continued G.2.0 discussions and testing for now... as I wont have a subscription to continue testing with it. I am dissappointed about that, I will admit :( But I will keep a close eye on the forum and hopefully things will come good soon.

Cheers all and sorry for going off topic a little. .I just wanted to explain to the guys who I started this thread with, why I am not coming back with more up to date info and test results.

Cheers



[TOPIC: post.html]
#141

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

@richard770:

 

I think you're doing the right thing. Shure it's always nice to play around with a new tool. But as long as you can save some money.. and are still able to work with the free edition ... while graphics 2.0 needs time to be a bit more mature - why spending it?



[TOPIC: post.html]
#142

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

OK. I've done some research about the iPhone 4 / 3GS issue, and the behavior we see (3GS being faster) is natural.

Both devices use the same CPU/GPU!

 

iPhone 4:

CPU: Single-Core ARM Cortex-A8
GPU: PowerVR SGX535
Clock Speed: 800 MHz

iPhone 3GS:

CPU: Single-Core ARM Cortex-A8
GPU: PowerVR SGX535
Clock Speed: 600 MHz

 

Although the CPU on the iPhone 4 is running at a higher clock speed, the poor little GPU has to deal with 4x the pixels with its Retina Display. So it's quite natural that all 4th generation devices' graphics performance will suffer. Especially when we start using a lot of fancy GPU intensive G2.0 filters.



[TOPIC: post.html]
#143

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

A horizonal/vertical blurSize of 40 is a bit taxing for the GPU, as every pixel will have to be blurred 40x40 pixels which is a lot of processing.

 

I reduced both to 8 in my sample project with pretty much the same visual effect, and it performs at 60fps on an iPhone 3GS and iPad mini. iPhone 4 suffers, but that's due to the fact that it uses the same GPU as the 3GS (as I wrote in a post above).



[TOPIC: post.html]
#144

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

@ingemar Is it still the case that apps built with G2 suffer performance issues on 4th gen divices, but not if built with G1.0 builds?m
If so, I dont see why its the GPU thats the problem?
Cheers

[TOPIC: post.html]
#145

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

@richard

 

I created my own sample project that was similar to CineTek's and as of build 2016, those frame-rate issues are gone.

You might also recall that I was experiencing similar problems with a production app that I had converted to Graphics 2 (no compatibility mode). That app also runs fine on iPhone 4 now.

For these apps, there's no speed / frame-rate difference between Corona G1 and G2 on the iPhone 4.

 

The issue that @roman has posted is a bit different as it relies on the power of the GPU to create the effects (and can't be run using G1). I was unaware that the iPhone 4 had the same GPU as the iPhone 3GS. Basically it's just an iPhone 3GS with a Retina Display. It's only the iPhone 4S that got a bump in GPU.

I found many topics around the web where the iPhone 4 was criticized for having a severly underpowered GPU considering it has 4x the number of pixels to drive.

 

I guess that there are *some* issues that the guys at Corona Labs will be able to tweak in G2, but since we're talking about using the GPU in ways that wasn't possible before in G1, we're going to start to see device limitations now, which unfortunately Corona Labs can't do anything about.

 

Having said that, there should be *no* speed differences between G1 and G2. So if an app runs fine in G1, and doesn't in G2... it should be reported.



[TOPIC: post.html]
#146

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

@ingemar Thats good to hear.
Maybe its an idea to load low res assets on iphone 4 and not @2x if your specific app is suffering as a result of GPU limitations

[TOPIC: post.html]
#147

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

The test project I have has no graphic assets at all... there are only newCircle, newLine and newText objects with solid fills.

 

 

After finding out that the iPhone 4 has a weak GPU (actually all 4th gen. devices), I'm personally not going to use it to benchmark my apps anymore.

I'll be doing my testing on the 3GS instead. If it runs poorly on the iPhone 4, I'll just see if there's something evidently wrong with my code, but I'm not willing to put too much effort into, or strip functionality, trying to accommodate weak hardware.

 

If it runs well on a 3GS and all other devices, I think I'm going to be fine with it  ;).

 

PS.

To avoid bad reviews, we *could* check for a 4th gen. device when starting the app and have conditional statements within our code to skip G2 effects that are known to cause problems.... but the question is: Is it worth the extra effort/code to fiddle around with this?



[TOPIC: post.html]
#148

searchm

[GLOBAL: userInfoPane.html]
searchm
  • Contributor

  • 187 posts
  • Corona SDK

@ingemar:

 

thanks for the overall information.

I also didn't know exactly how blurSize works.

I changed it the way you suggested and it works much better now.



[TOPIC: post.html]
#149

cublah

[GLOBAL: userInfoPane.html]
cublah
  • Contributor

  • 379 posts
  • Corona SDK

Actually there are a number of differences between the 3GS and the iPhone 4 The processor speed is higher in the iPhone 4 (800 as opposed to 600mhz) as well as the gpu is a faster version in the iPhone 4 (200 MHz as opposed to 150 MHz) the iPhone 4 also has twice as much ram.




[topic_controls]
« Page 6 of 6 4 5 6
 
[/topic_controls]