Discussion on Flappy Fish - iPad & iPhone Game Cocos2d Admob

52 comments found.

How could you code an object in between the pipes? Like a coin or something and so that it disappears after you go through it.

Thanks.

Hi zmc916
I’m sorry , there is no this feature
Best
Tang

well what exactly do you mean by there isnt this feature? I mean is it not possible at all then? I mean Just a simple line of code that can call upon on image in between the pipe gap would be all that is required. It seems pretty simple to me I was just hoping you could try to help me out cause i’m new to app coding and this simple thing would take me days to figure out! if at all. So please if you can lead me in the right direction or give me a line of code to try i would really appreciate it. Thanks in advance!

Sorry zmc916
You can create coin in the class PipeSprite , give it a random position ,random visible
When fish is close enough to the coin , hide the coin , play a sound , add score
But sorry zmc916 , I’m not going to make it for you , it’s not just a line of code , it could take over than 150 lines
Kind regards
Tang

Hello! I put background music to the game. In GameMain.m I created a button to stop / resume the music. In InGame.m music stops if lost, and resumes when play again.

The problem I have is that if the player does not want music, the player disabled music in GameMain.m, but when playing a game, lose and restart the game, replays the music. I need to pass the value of a boolean in “GameMain.m” to “InGame.m”.

How I can read the value of the boolean (GameMain.m) from InGame.m?

Thanks

genius :)

One interesting thing in the AppDelegate.m, I changed this line when the size of the banner is configured. With this line, the height is maintained, but the width is automatically set to the device screen. Now banner spans the entire width of the ipad, and still has the same size as before in iphone.

bannerView_ = [[GADBannerView alloc] initWithAdSize: GADAdSizeFromCGSize(CGSizeMake(ws.width, ws.height-(ws.height-50)))];

Hi unomas
It’s not the width and height of the ad banner , it’s position
Regards
Tang

Hello, here a few questions: Can I change the images as the background, pipes or fish images easily? Any Level Options? Post High Score to Facebook/Twitter Integrated? Push Notifications Integrated? Thank You.

Hi heman85
Yes , it’ easy to change the graphics
And there is no level, it’s endless , and no score to Facebook
Regards
Tang

Hi, I need your help. In latest update you mention that you fixed a bug where user was not able to tap in place where “back” button was placed.

I made and app but don’t wan’t to modify fully again. Can you please mention me the lined of code where you have made changes on in latest update.

thanks,

Hi ilovecoding
You can send your project to me
Regards
Tang

Hello, I have this issue: Semantic Issue // optimization. Should only be used to read it. Never to write it. extern CGFloat __ccContentScaleFactor;

Can you help me fix this? thanks

Nevermind, I fixed it thanks :)

Im in the Xcode simulator and cannot get by the game center sign in. I have no way to skip it and when I sign in with my apple Id it says game to found in game center. Does anyone know how to turn it off. If turned it off in one setting and it would not rebuild successfully.

fixed it never mind

do you need to have a server for this app?

Hi canarywolfdesigns
No , you do not need a server
Regards
Tang

Hey Tang, the biggest problem i have right now is how the 3.5 inch and 4 inch hd screens share the same images under “-hd” extension. It doesn’t really make sense to me why they would, considering they are totally different sizes and its impossible to align everything. How can we make it so there are different images being used for the 3.5 inch hd screens. Maybe even use the normal extension names for these devices considering the standard definition screens are no longer supported for 90% of apps and I m not even gonna develop for this device.

Thanks again.

Hi zmc916
I didn’t use if/else statement , since it’s troublesome and unnecessary
But anyway ,you can use this to know it’s 4 or 3.5 inch
CGSize stageSize=[[CCDirector sharedDirector]winSize];
        if(((int)(MAX(stageSize.width, stageSize.height)))==568){
            // 4 inch
        }

        else{
            // 3.5 inch
        }

Kind regards
Tang

Ok well from here how do I program it to use a unique name for all the images, or perhaps just use the normal name without any prefixes if that would work?

Oh and can you also tell me how i would make the pipes and bg layers transition off screen before the scorebox appears at the end of game. thanks!

Will it work on Iphone 5s ?

Hi AdamGadam
Yes
Regards
Tang

But when I try to build an app using the 64-bit simulator xcode shows an error.

Hi , please do not use 64bit
Regards

Hey Tang can you tell me why the AdMOB Ad system isn’t displaying in either the simulator or devices? Do i have to enable it somehow? I want to make sure it works and test it out, thanks.

Hi zmc816
Please change Admob id in GCHelper.m

// your admob id
+(NSString*) getAdmobID{
    return @"XXXXXXXXXXXXXX";
}
Kind regards
Tang

Hi, Can i submit with same graphics/ sound ?

not work

ld: warning: ignoring file FlappyFish/libs/AdMob-6.5.1 2/libGoogleAdMobAds.a, missing required architecture x86_64 in file FlappyFish/libs/AdMob-6.5.1 2/libGoogleAdMobAds.a (3 slices) Undefined symbols for architecture x86_64: “OBJC_CLASS$_GADBannerView”, referenced from: objc-class-ref in AppDelegate.o “OBJC_CLASS$_GADRequest”, referenced from: objc-class-ref in AppDelegate.o “_kGADAdSizeBanner”, referenced from: -[AppController application:didFinishLaunchingWithOptions:] in AppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

by
by
by
by
by
by