Projects > cpp > Issues > Bug #350

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

TransitionsFade flickers on both android & iphone

Bug #350 [Closed]
walzer@cocos2d-x.org 2011-02-14 00:13 . Updated about 10 years ago
  • replaceScene on android flickers
  • For example, run FadeTransition test case, click the button in middle to reset the transition, repeating fade in/out, then we can see the screen flickers more often
  • and some cases with better effects in TransitionTest are incorrect visually. I don’t know if it’s another issue. The description above is feed back from QQ group.

My opinion, HTC Magic is using Qualcomm adreno, while Moto Droid2 is using PowerVR chipset. So it isn’t caused by the different implementation of OpenGL ES standard in different chipsets.

StrawberryMilkshake 2011-02-14 06:12

replaceScene flickers on my Win32 system as well. It shows a full black frame just before starting the transition to a new scene. It’s very visible when using fade effects to fade out the old and fade in the new scene.

I could only fix it by adding a really dirty hack to stop GL from drawing anything between starting the transition for replacing a scene and 0.1 seconds afterwards (I probably won’t be uploading the hack to this place, as it’s really, really, really ugly).

walzer@cocos2d-x.org 2011-02-14 17:55

Hi, Strawberry
Ref to issue #344 and the post http://www.cocos2d-x.org/boards/10/topics/524?r=536\#message-536
You said that after take out the modifications for fps throttling, there’re no more weird flickering on android device. Is it the same case to this issue?

StrawberryMilkshake 2011-02-15 02:45

No, it’s (unfortunately) not related to the fps throttling. The flickering caused by the situation described in the post you’re linking to was different (many black frames all the time instead of just one black frame at the beginning of a transition).

I’ve been investigating this bug here a little further and found the following post @ the Cocos2d-iPhone boards:
http://www.cocos2d-iphone.org/forum/topic/9714

I think that might be the very same bug.

walzer@cocos2d-x.org 2011-03-05 00:12
  • Target version set to 9
walzer@cocos2d-x.org 2011-03-20 23:37
  • Target version changed from 9 to cocos2d-0.99.5-x-0.8.3

ok, I test it again today

on win32 version
* fade series flickers once at the start, then work normally.
* flip series keep filckering during the transition
* slide series works well

on ios release version, running on ipod touch 3gs
* FadeTransition have a probability of 25 to flicker at the start, 75 chance works correctly

walzer@cocos2d-x.org 2011-03-23 07:33
  • Target version changed from cocos2d-0.99.5-x-0.8.3 to cocos2d-0.99.5-x-0.8.2
walzer@cocos2d-x.org 2011-03-23 07:48
  • Subject changed from TransitionsTest has incorrect effects on HTC Magic & Moto Droid2 to TransitionsFade flickers on both android & iphone
  • Category changed from 2 to 5
  • Status changed from New to Accepted
  • Assignee set to huangrh
zhangxm 2011-04-02 01:21

bool CCTransitionFade::initWithDuration(ccTime duration, CCScene *scene, ccColor3B color)
{
if (CCTransitionScene::initWithDuration(duration, scene))
{
m_tColor.r = color.r;
m_tColor.g = color.g;
m_tColor.b = color.b;
}
return true;
}

m_tColor doesn’t init the value of “r”. It should init the value to “0”, like:
bool CCTransitionFade::initWithDuration(ccTime duration, CCScene *scene, ccColor3B color)
{
if (CCTransitionScene::initWithDuration(duration, scene))
{
m_tColor.r = color.r;
m_tColor.g = color.g;
m_tColor.b = color.b;
// init the value of r
m_tColor.r = 0;
}
return true;
}
It doesn’t matter in cocos2d-iphone, because object-c init the value by default.

zhangxm 2011-04-02 19:05
  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:a2f6fc1915dff16563d64cbbb42a6f6f5df8cffc.

walzer@cocos2d-x.org 2011-04-02 19:06
  • Status changed from Resolved to Closed
StrawberryMilkshake 2011-04-03 02:13

Oooh, it’s so smooth now! Many many thanks for tracking this one down!

walzer@cocos2d-x.org 2012-05-25 08:19
  • Project changed from cocos2d-x to cpp
  • Category deleted (5)
  • Target version deleted (cocos2d-0.99.5-x-0.8.2)
agenindonesia 2014-11-25 20:31

Pokerstar88.com Agen Texas Poker Dan Domino Online Indonesia Terpercaya
OK, I’ve updated the announcement and added a link to zipball on google code. Thank you for reminding me.
Agen Indonesia | Agen Bola | Poker Indonesia

ionliga 2014-11-28 14:37

The optimization introduces a bug where the priority and Touch Mode will not get changed if the list is locked.
The most straight forward fix is to merge the pHandlersToAdd and pHandlersToRemove into a queue and process through all of them in the order they are received

Pokerstar88.com Agen Texas Poker dan Domino Online Indonesia Terpercaya | Agen Bola | Taruhan Bola | Agen Bola | Olb365.com Agen Judi Bola Online, Agen Judi Casino Online Indonesia Terpercaya

Atom PDF

Status:Closed
Start date:2011-02-13
Priority:Normal
Due date:
Assignee:huangrh
% Done:

100%

Category:-
Target version:-