User Tag List

Results 1 to 5 of 5

Thread: Pausing a game in full screen mode when the game loses focus

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,159
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)

    Pausing a game in full screen mode when the game loses focus

    If I'm playing my game in full-screen mode then -

    When I pause my game using the inbuilt - press any key to continue - and I happen to alt-tab out of it while it is paused, or I'm doing something that causes the game to lose focus - then the screen goes black with just the name of the game in the top left corner.

    It appears as if the game has crashed since there's just a black screen and my pause message is no longer there. And this is what it's going to look like to the users.

    If I happen to remember that the game was paused and press any key I can get the game back from its "black state" but I can't really expect any users to know this.

    Does anyone know a solution for this?


    I solved this by testing a variable and if the game is in full screen to first change it to window mode before pausing the game (but only when you're pausing the game to open an external programme) and then when the pause ends it tests the variable again and will return it to full screen mode. I still get this issue if the user first pauses the game and then presses alt-tab.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,159
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    I'm not winning with this:

    This is a problem with using Runtime options - display options - Direct3D 9.

    The problem does not exist if I use standard display but then the movement in my game isn't smooth.

    When I press pause and alt-tab out of the game in full screen mode - or something happens on my computer that overrides the game - then 100% of the time I will have an empty black screen when going back to the game until I press any key. But I know that I need to press any key - to someone who is playing the game it looks like it has crashed.

    This is happening some of the time when in window mode with pause on. Sometimes the game retains it's surface sometimes I get a black screen here too.

    If the game loses focus and it is not paused then I don't have this problem but then since the game isn't paused it keeps on running. When you come back to it - lots has happened.

    As far as I can determine the last screen written is being lost - as I understand it - it writes the surface to a temporary memory and then something in windows needs that temporary memory so it takes it and uses it and then it is lost to my game, so I get a black screen.

    I do not know if there is something I should be doing myself or if it is something inside Fusion that isn't working.

    But all I really need is just a message to show - press any key to continue when there is black screen but I don't know how to do that.

    Further information that might be useful:

    Code:
    Runtime Options:
    first blocks - empty
    
    Display Mode:  Direct3D 9
    V-Sync - ticked
    
    Style
    Ticked:  Heading, no maximise box, no thick frame
    
    
    Full Screen
    Change Resolution Mode - Ticked
    Allow user to switch to / from – Empty
    Keep screen ratio - Ticked
    Screen ratio tolerance - 8
    
    Options
    
    Resize display to fill window size - ticked
    Fit inside (black bars) - ticked
    Anti aliasing when resizing - ticked
    Do not centre frame area in window - empty
    Multiple Document Interface (MDI) - empty
    Force global refresh - greyed out empty
    (I also noticed that using DirectD 9 makes the game unplayable in Windows XP since the objects are not drawn on their right spots and sometimes not even close to their right spots. Sorry for those people still using XP...)

    I did notice that using window mode sometimes the game will be over my task bar and sometimes it will be under my task bar - mostly with the settings I now have it will be over the task bar so it forces you in window mode to minimise the game to use the task bar and this is often when it is losing it's surface and showing a black screen instead.

    Help?

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,159
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    Attached is a .mfa

    If I press pause and then alt-tab out of it - I will have a black screen with the name in the corner. [it's not hanging - press any key on your keyboard]

    If I don't press pause and alt-tab out of it - there is no problem but the game is not paused.

    And I really don't know what to do about this, and if it is just my graphics card or universal.
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Wodjanoi's Avatar
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    665
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I never use Change Resolution Mode. It seems that pressing Alt+Tab in Fullscreen mode causes this unwanted side effect.
    So you have to find another solution to switch to other processes in pause mode without pressing Alt+Tab.
    I made a modified version of your example file: Pausing the game will force Window Mode and Windows Taskbar.

    Test_WindowModePause.mfa

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,159
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much Wodjanoi!

    I've been testing it now in different circumstances using your code in my game and the Pause screen always shows when the person isn't in the game.

    I actually picked up the error because I was pausing the game to open a page in my browser and then noticed I couldn't return to the game - it's just that alt-tab was giving me the same behaviour.

    But when I play any games in full screen mode I often alt-tab out of them - for a variety of reasons.

    Thank you!

Similar Threads

  1. Game speed falls in the full-screen mode.
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th October 2007, 09:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •