User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Workaround: Pause menus with MMF2's built in pause function (help me improve this?)

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,143
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Workaround: Pause menus with MMF2's built in pause function (help me improve this?)

    I've discovered a nice little method to put a pause menu into your game without using the Q&A object or manually pausing every object, it could do with some work though... Essentially I use MMF's built in pause feature but I cheat a little, here's what I have so far...

    (Note that here I have done this first move in two separate events, if you make the menu visible and pause the application in the same event it will pause the application first as the pause action takes priority.)

    Mouse clicks on pause button + [pause menu object(s)] is invisible:
    - Make [pause menu object(s)] visible


    Pause object(s) is visible + Only one action when event loops:
    - Pause the application and resume when any key is pressed
    (On iOS, this resumes when you tap anywhere on screen)

    [pause menu object(s)] is visible + Mouse pointer is over [menu item]:
    - [Execute the chosen menu item's function]
    - Make pause menu object invisible


    See, on iOS, MMF reads the mouse pointer position as the last touch, imagine an invisible mouse pointer which follows your finger then stays where you left it when you aren't touching the screen. What happens is that when the app is resumed, the last touch will be where you tapped to resume the game, so you can detect a tap on a pause menu item by looking at the mouse pointer position when resuming the app. Note that I use the visibility of the menu objects to check for resume as it won't check the mouse position on the 'end of pause' event for some reason. For more control, you could use an internal flag.

    The only problem I'm having is how to react when the user taps somewhere where there isn't a menu item - it will resume no matter where they tap and we get away with this by just detecting where that tap WAS when the game resumes.

    There are two options... Method A is to remove the menu from the screen when you tap anywhere other than the menu items, meaning if you tap anywhere on screen where there isn't a menu item, it will resume the game.

    Method B (AFTER the existing events):

    [pause menu object(s)] is visible:
    - Pause the application and resume when any key is pressed


    This one pauses the game again if the tap wasn't on a menu item. This is the more professional method but frustratingly it's not quite right because the game will resume for a split second and then pause again, giving you a split second of audio and sometimes some game movement.

    So it seems it's best to have something which says "PAUSED. Touch the screen to continue." With the quit buttons etc. underneath, but it'd be nice if I or somebody could find a way to prevent the split second of resumed gameplay when using method B. Any ideas?

    Note: You'll find this usually works on the device but not on the Windows runtime

  2. #2
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-on
    iamjot's Avatar
    Join Date
    Nov 2008
    Location
    Austria
    Posts
    723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds simple and good. Damn - I can┤t test it for i have no mac at the moment. But I┤m sure it works! Great Thx distant J!

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,143
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Argh, I have actually gone back to the Q&A method in my current game because this method is currently too glitchy, I'd need to rethink it. I attempted it because some of the AWESOME Land players (though 2 or 3 out of of thousands) said that the dialog box pause was unprofessional, but after spending all day working on that system only to find it had glitches I feel like it's not worth it, lol.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-on
    iamjot's Avatar
    Join Date
    Nov 2008
    Location
    Austria
    Posts
    723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know what you mean. 1 or 2 people said the same about the highscore object in my game "Stromfel". By now I think: well if it works - it┤s ok. So DistantJ 2 or 3 people are just 2 or 3 people there will always be critics i guess!

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export Module

    Join Date
    Nov 2010
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks DistantJ. I just needed a custom pause screen to come up with no menu items at all, and this seems to work great. So at least you helped me out with this

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DistantJ, what pause method do you use in Manos? I'm sure it looked different to the current q&a method.

    I am using that method in my game, but i don't like it too much. The q&a graphic doesnt appear the way i intend in my game and secondly, if you rotate the ipad/iphone screen it doesnt move around and just looks a bit weird..

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could someone share any info on what pause methods they use? I really not so keen on the Q&A method..

  8. #8
    Clicker Fusion 2.5iOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    SolarB's Avatar
    Join Date
    Feb 2012
    Location
    Melbourne
    Posts
    906
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Put everything except the pause menu in a group and deactivate it on pause. Stop animations and anything else like that. On unpause, activate game group and resume animations. You can store animation frames in variables for use on resume. Most reliable method.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SolarB View Post
    Put everything except the pause menu in a group and deactivate it on pause. Stop animations and anything else like that. On unpause, activate game group and resume animations. You can store animation frames in variables for use on resume. Most reliable method.
    Good point. I shall have to give it a go. Thanks.

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,143
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that's the best method besides my workaround but it's difficult if most of your programming is done in behaviours instead of in the frame (I do this to keep everything global), unless you build the whole thing with the pause in mind and use a '+"Pause"=0' on every event that moves things along.

    In MANOS the Q&A object was used to pause the game, but I used a crude 'stop everything which moves' method (i.e. added a '+ Layer "Text" is invisible' to events which make enemies move), and it's not perfect. There are rare occasions in which the player can come in contact with an enemy while reading text and lose all their health while the text box is playing, for example.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. joypad object and pause function
    By markofthedog in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th July 2012, 07:02 AM
  2. Need a better way to pause...
    By Konidias in forum Multimedia Fusion 2 - Technical Support
    Replies: 22
    Last Post: 15th October 2010, 12:20 PM
  3. Best Way to Pause
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th December 2009, 08:13 PM
  4. PAUSE?
    By scurvy in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 30th May 2009, 08:51 PM
  5. Pause
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 24th July 2008, 09:11 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
  •