Retina Simulator Halves Framerate

Forums Programming cocos2d support (graphics engine) Retina Simulator Halves Framerate

This topic contains 6 replies, has 5 voices, and was last updated by  Ernesto Hernandez 2 years, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
Author Posts
Author Posts
August 29, 2011 at 1:48 pm #234780

davecom
Participant
@davecom

This doesn’t affect performance on the device – however I’ve noticed some very strange behavior when testing using Cocos 1.0 in the Retina Display simulator 4.3.2 . Not only do framerates cap at exactly 30.0 fps instead of the usual 60.0, but also time literally slows down 2X – so my seconds timer takes 2 seconds for each second… Has anyone seen this themselves or does anyone have any idea about what maybe causing it? Of course since it’s fine on the device it doesn’t affect my development THAT much, but it’s nice to test retina graphics on the simulator.

August 29, 2011 at 1:52 pm #345172

actinism
Participant
@actinism

well, that’s normal, it is an emulator with a software renderer…

August 29, 2011 at 2:12 pm #345173

Blue Ether
Participant
@blue-ether

@actinism is right about the software renderer. The speed it runs at will be highly dependent on your system specs. Even really high spec machines can struggle with the iPad/ Retina simulators.

I think it is important to note that the term “emulator” is not accurate to describe the simulator though, because it is NOT emulating iOS. It is only giving the appearance of running iOS. An emulator seeks to exactly mimic (emulate) all of the behaviors, limitations, and quirks of a given hardware. The simulator doesn’t attempt to do that, which is why many times the two behave in different ways. If you think about it as an emulator you can start to make bad assumptions about your code.

Those familiar with Android development – Android uses an actual emulator. But you pay the price for it- you’ll frequently get 1-5 FPS, even with a high end machine. Which, as you can imagine, makes it as good as worthless.

August 29, 2011 at 2:29 pm #345174

davecom
Participant
@davecom

Thanks for the replies, guys. I would definitely understand a drop in performance just due to simulator performance… but we’re talking about a very exacting halving here. A max framerate of EXACTLY 30.0 instead of 60.0 and time being stretched out by EXACTLY a 2x factor. Isn’t that more than performance, but some kind of behavioral symptom?

August 29, 2011 at 3:54 pm #345175

slembcke
Administrator
@slembcke

No. Again the graphics are all rendered in software. The number of pixels to render are increased by 4x! The reason why it’s exactly halved is probably because you are using a display link to control the framerate and are taking longer than 16ms to render due to the extra pixels. So it only draws every other frame.

August 29, 2011 at 4:03 pm #345176

davecom
Participant
@davecom

That makes a lot of sense, thanks!

August 29, 2011 at 4:16 pm #345177

Ernesto Hernandez
Participant
@ernesto-hernandez

I’ve noticed in the simulator if you get more than 60 frames it stays at 60 and if you have less than 60 it syncs to 30. I’m not sure if it’s a Cocos2d thing or the simulator.

Also if your timer is taking two seconds instead of one then I assume it’s frame based and that’s generally not a good practice.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.