
- #Megaman sprite game fullscreen for mac
- #Megaman sprite game fullscreen full
- #Megaman sprite game fullscreen pro
- #Megaman sprite game fullscreen code
- #Megaman sprite game fullscreen windows
#Megaman sprite game fullscreen windows
These type of windows do not accept keyboard input when the key window changes. These workarounds use an NSBorderlessWindowMask. Also please remember to file bug reports with Apple.Īdditional Info About NSBorderlessWindowMask Also you may need to change the window level depending on if you have other views such as dialogues that your App should not overlap. If for some reason these workarounds don't work, try messing some more with the size/position of the window. !.setFrame(CGRect(x: 0, y: 0, width: size.width, height: size.height+1), display:true) Workaround 2: Fullscreen with no Menu Bar !.styleMask = NSBorderlessWindowMask !.setFrame(CGRect(x: 0, y: 0, width: size.width, height: ().mainMenu!.menuBarHeight), display:true) Workaround 1: Fullscreen with Menu Bar !.styleMask = NSBorderlessWindowMask
#Megaman sprite game fullscreen full
The second workaround puts your App in complete full screen with no menu bar. The first workaround puts your App in fullscreen and displays the menu bar at the top. Your App should function just like it did in maximized window mode. Both of these workarounds do not cause any drop in FPS. And in the worst case you could adjust your nodes position by 1 point to account for this.įor your convenience, listed below are the 2 workarounds. This will cause your App to get slightly cut off on the top but 1 pixel shouldn't be noticeable at all. So to fix the issue all we need to do is make our window size height 1 point larger which will prevent OS X from trying to optimize our window. OS X v10.6 and later automatically optimize the performance of Thus the bug must be related to an optimization (how ironic) apple does when your window size matches the screen size.ĭon't believe me? Here is a quote from the link. In fact, as it turns out, just be adjusting the window size by 1 point fixes the drop in fps. But obviously it's not truly fullscreen because the menu bar is visible !.setFrame(CGRect(x: 0, y: 0, width: size.width, height: ().mainMenu!.menuBarHeight), display:true) So I tried moving the window down so that just the menu bar was visible as shown below. So then I thought what if I mess with the size/position of the window. !.setFrame(CGRect(x: 0, y: 0, width: size.width, height: size.height), display:true)īut, sadly, same problem. Let size = NSScreen.mainScreen()!.frame.size !.level = Int(CGWindowLevelForKey(Int32(kCGMainMenuWindowLevelKey))) + 1
#Megaman sprite game fullscreen code
The code for this is as follows: !.styleMask = NSBorderlessWindowMask Using some of the code from the guide, I managed to enter fullscreen by setting the window size to the size of the display, and positioning the window above all OS X UI. So then I tried a less high-level approach to going full screen. Keep in mind, I had no fps issues when in maximized window mode or even full screen with the menu bar visible! (see pictures in question). So then I searched around and found a different way of entering fullscreen using this code: (NSScreen.mainScreen()!, withOptions: nil)īut I still had a massive drop in FPS. Below is how you enable the fullscreen button: !.collectionBehavior =. The issue is that making your App enter fullscreen by clicking the fullscreen button causes a massive drop in FPS. So before I begin, lets recap what the issue is. I believe it should, when I get the chance I will test and see if the workarounds below work.
#Megaman sprite game fullscreen pro
I've tested the workaround on MacBook Pro (Retina, 15-inch, Early 2013), I have no idea if the workarounds I present below will work on other Macs. I'm using an NSViewController in a storyboard which holds an SKView. Before I begin, let me start by explaining my setup. Ok, after weeks looking into this issue I have found some workarounds to this issue. You would think full screen mode could better optimize drawing but apparently it's quite the opposite. I don't want to release my App with full screen mode if it means users will lose performance. I suggest trying it out for yourself, you don't even have to write any code if you use Apple's default sprite kit template for OS X.įull Screen Mode (FPS Drops to 30-40 FPS)įull Screen Mode With Mouse At Top Revealing Menu Bar (Surprisingly, NO FPS Issues: 59-60 FPS)Īnyone have any idea what might be causing this problem. Here are the screen shots I took of the default game template for mac.
#Megaman sprite game fullscreen for mac
You can even test this bug by making a sprite kit game for mac in Xcode using the default template. However, the moment I make my App enter "Full Screen," the fps drops to 30-40 fps and stays that way? But if I take my mouse cursor and reveal the menu bar while full screen is enabled, the fps goes back up to 60 fps! I get 60 fps always, regardless of how my game is scaled when the window is resized (even when resized to max screen space). I'm making a fairly complex sprite kit game.
