Opacity issues with Cocos2d iPhone - cocos2d-iphone

I'm having issues with opacity on several animations in Spine after an upgrade to Cocos2D 3.1.1 from Cocos2D 2.1
To better ilustrate what I am talking about, here are two videos that show the difference between the animations:
YouTube Video: Cocos2D 2.1 (See "explosion animation" around 6 seconds into the video)
YouTube Video: Cocos2D 3.1.1 (See "explosion animation" around 7 seconds into the video)
I have already tried the following:
Having my designer export the Spine Animation on both non-premultiplied and premultiplied alpha values.
Tried setting the blendMode programmatically (via [SkeletonAnimation setBlendMode] ) to either one of:
[CCBlendMode alphaMode]
[CCBlendMode premultipliedAlphaMode]
[CCBlendMode addMode]
[CCBlendMode multiplyMode].
Any ideas?
Thanks in advance for any help!

Related

Qt GIF creation: Colours swapped when using gif-h library

Apparently, I am trying to use gif-h library for gif creation with qt 4.7 for a C++ project. After embedding the library to the project, I can generate GIF through my qt GUI app, however, the colours on the final/actual GIF are swapped. What I mean is that:
below red frame
becomes below blue frame
and same goes for other way round (i.e. blue frame becomes red frame).
Just like above, below orange frame
becomes below sky blue frame
and same goes for other way round (i.e. sky blue frame becomes orange frame).
Could someone familiar with the library or graphics or gif creation in code guide me?
I am happy to provide more information about image capturing and such, as and when needed.
Thank you in advance.
Ok, I have managed to resolve the problem by using QImage::rgbSwapped() function. Thank you to #Pablo Yaggi particularly for the hint.
I will have to remove the code snippet from the question due to security reasons.

Cocos2D-X CCTransition shows background between the 2 scenes

I've been trying to successfully create a slide transition between 2 scenes for the past 2 hours and all I can find are just some answers in Objective-C and I have no idea how to translate them.
I'm using XCode 5 with Cocos2D-X 2.2.3 to develop for iOS.
CCTransitionSlideInT *trans = CCTransitionSlideInT::create(1.0, Scene2::scene());
CCDirector::sharedDirector()->replaceScene(trans);
Doing that makes my current scene slide down and gets replaced by black (background) THEN after the transition is done, the second scene appears without any transition effects; it just appears.
How can I slide the first scene with the second one attached to it?
I've seen that it's done in TestCPP. I tried tracing it but it got too complicated for me. All I really need is some clarification!
Thanks in advance! And I hope I provided all the necessary info.

Somethings wrong with GoogleMap SDK iOS

My app is using both UIkit and cocos2d. After using view with GoogleMap SDK and show cocos scene. xcode show this:
cocos2d: surface size: 0x0
Failed to make complete framebuffer object 0x8CDD
And the screen is black, and can do nothing except restart app.
I have searched so many website, so many people have same problem but no solution for that.
So is it impossible to use Google Map sdk with cocos2d? If not what can I do?
(Before using GoogleMapsdk I used MKMapview, it doesn't cause this problem but it's not as good as GoogleMap)
Google Maps uses OpenGL ES to render the map. Two OpenGL renderers can not be mixed, they both use their own GL context. Specifically on iOS there seems to be little support to run two GL views side by side (let alone on top of each other).
So no, for all intents and purposes mixing cocos2d and google maps on iOS is not possible.

Cocos2d-Things appear bigger in simulator

I've recently noticed that things accommodate differently on the simulator and a real device when using Cocos2d.To make sure I did the following:
1. I created a blank Cocos2d project. In the init method I created 7 sprites from Icon-72.png(which is found in the resources folder of the Cocos2d template) and added them to the screen.In the simulator only 6.5 sprites could accommodate side-by-side whereas in the iPod touch all seven sprites could accommodate easily and almost half of the screen width remained unused.
2.Then I created a project from Single View Application template. I added the same Icon-72.png to the project. Then on the storyboard I added 6 image views and set their image property to Icon-72.png. This time I had exactly the same result with both simulator and the device.
I guess there should be some tweak as to how to fix this issue with Cocos2d because it's not Apple's fault. Do you know how to handle this?
The iPod Touch could have the retina display and the simulator wont have have it. If you need the same display as of the iPod Touch You can use the iPhone Simulator with the Retina Display and you would get the same screen. Another Option you can use is Copy and paste the Same file with -hd prefix ex:(Icon-72-hd.png) with 72x72 size and you can get the same result.
There is no problem with either the version of cocos2d or with the Apple for the issue you are facing.
I guess I do have poor explanation but you would understand my explanation.
The iPod Touch will be a retina display. Cocos2d doesn't automatically double the size of images.

iOS 4.3 causes black screen (4.0-4.2 was fine) - MPMoviePlayerController at fault?

I've made a game that uses cocos2d to display graphics, and uses a lot of MPMoviePlayerController to display cutscenes.
The problem is - the game stopped working on iOS 4.3. It was fine up until iOS 4.2, but on iOS 4.3 the movies play OK, the gameplay also happens, but the screen is all black when not playing the movies.
I have a hard time tracking the problem. Suggestions?
Edit: I narrowed the thing down to MPMoviePlayerController - if I disable it, everything is fine. I guess something changed in 4.3?
MPMoviePlayerController's view is clear in 4.0-4.2, and black in 4.3 by default, what helped was:
MPMoviePlayerController* moviePlayer = ...
moviePlayer.view.backgroundColor = [UIColor clearColor];
MPMoviePlayerController* moviePlayer = ...
[moviePlayer.backgroundView setBackgroundColor:[UIColor whiteColor]];
// or set need color
read more in "MPMoviePlayerController Class Reference"