Note that there are some explanatory texts on larger screens.

plurals
  1. POGame Center windows don't scroll smoothly on OpenGL game
    primarykey
    data
    text
    <p>I have an shipped OpenGL game that I'm adding Game Center support to for a 1.1 rev. The game does not use a UIViewController and is coded as follows in the AppDelegate:</p> <pre><code>-(void)applicationDidFinishLaunching:(UIApplication *)application { window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; [window setUserInteractionEnabled:YES]; [window setMultipleTouchEnabled:YES]; glView = [[EAGLView alloc] initWithFrame:[UIScreen mainScreen].bounds]; [window addSubview:glView]; [window makeKeyAndVisible]; [glView performSelectorOnMainThread:@selector(mainGameLoop) withObject:nil waitUntilDone:NO]; } </code></pre> <p>Everything works great, but when Game Center brings up a window (GKAchievementViewController for example), the window animates on screen fine, but when I touch to scroll it, it doesn't have any of the momentum or bounce-back like normal windows. When I scroll the window past the top and bottom and it doesn't return with bounce back.</p> <p>The window is fully functional, registers touches, it just behaves ugly.</p> <p>I assume this is because some information is just not being sent down the pipe correctly because I don't have a UIViewController? I tried creating a UIViewController that sits in-between the UIWindow and the OpenGL UIView, but I get the same behavior.</p> <p>This is how I'm creating the GKAchievementViewController dialog:</p> <pre><code>-(void)displayAchievements { achievmentsViewController = [[UIViewController alloc] init]; [glView addSubview:achievmentsViewController.view]; GKAchievementViewController *achievements = [[GKAchievementViewController alloc] init]; if (achievements != nil) { achievements.achievementDelegate = self; [achievmentsViewController presentModalViewController:achievements animated:YES]; } [achievements release]; } </code></pre> <p>I don't use any of the UIKit in the game, all buttons, etc are done with straight OpenGL. I am also not using cocos2d or any other framworks.</p> <p>In my main loop I am doing this:</p> <pre><code>while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.002, TRUE) == kCFRunLoopRunHandledSource); </code></pre> <p>Other than that, I am not making any regular calls into the OS.</p> <p>Does anyone know what is going on? My game is ready to submit other than this problem and it's driving me crazy.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload