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 1 of 6 1 2 3 »
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Anyone noticing a massive frame rate drop when they build for xcode sim or device?

 

I am running at 60fps.. works fine on windows and mac simulators.... but if I build for device (or Xcode sim).. my frame rate drops below 10... and the app is unusable!

 

Note: The same app, built using graphics 1.0 daily build 1233 works fine.

 

Cheers



[TOPIC: post.html]
#2

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Update: Built Raycast sample app for device set to fps=60, and its pretty poor. Its fine in the Corona Sim



[TOPIC: post.html]
#3

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

I've tested one of my physics-based apps with sprite animations @60fps.

It's also using Particle Candy and Text Candy, and I see no noticeable frame-rate drop with Graphics 2.0 build 2004 when running on a device.



[TOPIC: post.html]
#4

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

By the way...  

 

(this goes for Graphics 1.0 and 2.0 builds)

 

For me, Xcode Simulator builds have serious frame rate problems, and I haven't used them for a loooong time. The frame-rate drops get progressively worse as the size of the virtual device increases. iPad Retina for example is completely unusable.

 

I was told by a Corona Labs alumni that it was due to an issue with Apple. I filed a bug report with Apple (radar 11089495,  21 March 2012), but it got closed by them stating "Insufficient Information", as I couldn't provide them with enough detailed info about the issue.



[TOPIC: post.html]
#5

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Thanks for the info Ingemar.. Do you mind telling me what ver of xcode you're running? 5? Was there any settings you had to change when you upgraded to 5?

 

I am seeing a serious frame rate drop on my device.... but only when I build with graphics 2.0 build. 

 

Are you telling me you can set the frame rate to 60 for the raycasting sample app.. and build for Xcode or device and see no major drop? 



[TOPIC: post.html]
#6

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

PS. I have used the xcode sim for testing before... it does suffer from some framerate drop... but nothing like this... and it never translated to my device.



[TOPIC: post.html]
#7

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

I'm using Xcode Version 5.0 (5A1413) on OSX 10.8.5.

No special settings were done. Keep in mind that Xcode 5 will overwrite your Xcode 4 installation.

 

I haven't tried the Raycasting sample though. Once I do that I'll get back to you here...



[TOPIC: post.html]
#8

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

Graphics 2.0 build 2004

 

I've got no frame-rate problems when running the Raycasting sample on an iPod Touch 3G (iOS 5.1.1), iPod Touch 5G (iOS 7) or iPad mini (iOS 7). (I changed the fps to 60 in config.lua)



[TOPIC: post.html]
#9

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Thanks ingemar.. appreciate the info and testing.... I've got a local issue it seems!

I am running 2003... so will update to 2004 and try it... cause Im not talking about a reduced framerate.. Im literally talking a stuttering 5-10 fps... :/

I'll let ya know how it goes...

Thanks



[TOPIC: post.html]
#10

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

ok, built the raycast sample for my iphone4/IOS7 with build 2004.... at 60fps... works fine.

But my own app is still not.

Heres what I got.

 

An app that works fine in mac and win simulators on all builds of Corona...ie. public Graphics 1.0 1202.... daily 1233.... and graphics 2.0 build 2004.

 

If I build using graphics 1.0 builds, its fine.

 

If I turn on graphics compatibility 1 mode... and build with G2.0 build 2004... the framerate is about 5 on my iphone 4 IOS 7.... and the app is unusable.

 

Anyone suggest ways to debug such a problem? I have the texturememoryused printing to the display but thats not working at the moment.. so cant see if I have a memory issue in device builds with G2.0 2004.

 

Im stumped....

 

Cheers



[TOPIC: post.html]
#11

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

Just a thought...

I'm just wondering if V1 compatibility mode may be logging a bunch of warnings in the device log, that maybe is slowing things down?

 

(Like the old days of BASIC where too many REMs would cause an application to come to a crawl  :) )



[TOPIC: post.html]
#12

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

The physics app of mine that I referred to above is fully converted to Graphics 2.0 (no V1 compatibility mode)



[TOPIC: post.html]
#13

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Yeah, has to be something to do with backward compatibility. But that needs to work, cause we cant go back a migrate old apps.
I might migrate some functions and test as I go to see if I can find the issue.
Love to hear about any graphics v1 apps anyone has built for device with graphics 2 builds...
Cheers

[TOPIC: post.html]
#14

cublah

[GLOBAL: userInfoPane.html]
cublah
  • Contributor

  • 379 posts
  • Corona SDK

I think my problem is related to this, I have no frame rate problems (not that that I notice) except with iPad Retina 

 

http://forums.coronalabs.com/topic/40385-performance-problems-on-ipad-retina/



[TOPIC: post.html]
#15

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

@cublah

 

But you have frame-rate problems even when you use "Graphics 2.0 syntax" (without V1 compatibility) right?



[TOPIC: post.html]
#16

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

@cublah thks for the info. Yeah that sounds buggy.
I am going to migrate to graphics 2 where I can... Ie. anchor points etc.
I might also remove some functionality to see if anything particular is causing the performance to drop.
I just load my level... Transition to cam position and then do nothing. And my framerate sits below 10. My enterframe listener is not doing much until i touch a button so other than that its a couple of collision listeners

[TOPIC: post.html]
#17

cublah

[GLOBAL: userInfoPane.html]
cublah
  • Contributor

  • 379 posts
  • Corona SDK

@cublah

 

But you have frame-rate problems even when you use "Graphics 2.0 syntax" (without V1 compatibility) right?

I didn't use V1 compatibility, I went straight for Graphics 2.0



[TOPIC: post.html]
#18

cublah

[GLOBAL: userInfoPane.html]
cublah
  • Contributor

  • 379 posts
  • Corona SDK

I'm just glad other people are seeing a problem too it means I'm not going mad :), I will use V1 until something is resolved



[TOPIC: post.html]
#19

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

I only had a couple of instances of setreferencepoint.... so removed those and turned off graphicscompatibility.... app runs fine in G2.0 sim.. but still crap on device.

Works fine if built with G1.0 builds... so I dont think I need to optimise my code.. its fairly ok as far as I can see. Its a wip prototype so not too much going on at the moment either.



[TOPIC: post.html]
#20

CineTek

[GLOBAL: userInfoPane.html]
CineTek
  • Contributor

  • 310 posts
  • Corona SDK

I was working on a completely new project for today and used graphics 2.0 syntax only. If someone would like to test it with his/her device then I can send you over the code. At this moment everything is based on Corona-made vector graphics. 



[TOPIC: post.html]
#21

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

@CineTek

I wouldn't mind testing your prototype...  :) ingemarAtSwipewareDotCom

 

@richard770

How are you measuring frame-rate?



[TOPIC: post.html]
#22

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

I just tested by turning on Loqheart's FPS monitor, and I could see a progressive FPS drop.

I have a demo-mode in my game, and it started out at 60fps, but got progressively worse and ended up at around 20fps after a few minutes.

 

When I don't use the FPS monitor, everything runs fine with no FPS drop regardless of how long it plays...



[TOPIC: post.html]
#23

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Hey guys

I am using the FPS monitor you mentioned.. but removing it makes no diff.

My findings now are that if I include the following code in my app

 

		skyBleed = display.newRect( mainGroup, 0, 0, 480, 320 )
		
		bgImage = display.newImageRect( "images/bg2.png", 1136, 720+160 )
		bgImage.x = 480
		bgImage.y = 320+80
				
		bgGroup:insert( bgImage )

 

....my frame rate is terrible.

 

If I leave those lines out and leave the app at 60fps or 30fps... it will run at an average of 30fps. 

 

So basically it never runs at 60... but will run at 30 and "seem" ok if I dont load the above code. 

 

BUT: This app runs perfect at 60fps with Graphics 1.0 builds

 

There is defo a problem with graphics 2.0 I just dont know how to provide an example.

 

And I am not sure if staff are taking notice.. Ive had not reply to my other thread

 

http://forums.coronalabs.com/topic/40341-display-groups-coords-when-using-graphicscompatibility-1/

 

This should be sorted out.. graphicscompatibility=1 should mean that my groups scale around the same point as before



[TOPIC: post.html]
#24

CineTek

[GLOBAL: userInfoPane.html]
CineTek
  • Contributor

  • 310 posts
  • Corona SDK

I have sent over my project to Ingemar and it runs fine on his devices... So I guess the error is caused by something else during the build process...? 



[TOPIC: post.html]
#25

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

@Cinetek.. Really... are you saying a project that suffers frame rate issues when you build it.. works fine when Ingemar builds it?




[topic_controls]
Page 1 of 6 1 2 3 »
 
[/topic_controls]