User Tag List

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

Thread: ESC menu, pause game, tree menu with save slots

  1. #1
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    653
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    Question ESC menu, pause game, tree menu with save slots

    I need to make an [ESC] key menu that pauses the game, and has options you can select with the [UP] [DOWN] arrow keys, and when you press [ENTER] it changes the menu tree to save slots and load slots. The save slots should be able to press [ENTER] if a slot is selected and you can type a new name for a slot or rename and save over an existing slot.

    I wrote my own system in C2 (sorry!) last year, and here's the build of that game: https://www.dropbox.com/s/joacdpzx8v...build.rar?dl=0 if you download it and run the exe (all safe, promise!) it's a simple platformer level, but opress escape and you can see how I built the menu. Now, in C2, it was easy enough for a total dunce like me to write by myself!

    • I used some len stuff to take the keyboard input and add it to a string, then the string is reflected in a spritetext object, and it saves the name to a file along with the state of the game
    • The whole game has been paused by setting the global time to 0 and individually giving the menu items have a normal timespeed
    • Selecting menu trees (save page, load page) hides and shows layers and activates and disables groups that control them


    Here's a tutorial I wrote just after that guides you through the process with pictures: https://www.scirra.com/tutorials/501...-saveload-menu

    Now, sorry I've been showing so much C2 stuff, but it's all I know how to accomplish this in, and I'd like to know the BEST way of redoing all this in Fusion. I'm not familiar with sub-applications or ini files, so I'm hoping some genius out there can see what I've done and suggest the best way I can do all this in F2?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    That's a nice example!
    Of course this will become twice as cool now you're making it in Fusion ()

    The "best" way easily depends on lots of things
    (your game overall setup, your target platform(s), your preferences, your available time and so on)
    so you'll likely won't ever have a real "blueprint" for everything,
    here are only some ideas/suggestions:

    • I used some len stuff to take the keyboard input and add it to a string, then the string is reflected in a spritetext object, and it saves the name to a file along with the state of the game


    Would do exactly the same in Fusion.
    When the save menu is open, "listen" to user input (you can just enable an hidden editbox object and give it focus)
    then send to "spritetext" >> what we call text blitters, if you don't feel it's comfortable / reliable enough embedding a font.
    There are a number of user-made ones, or the text blitter extension, or you can make your own (have your font chars in an active, create/place apt chars in right position on need)
    Saving to a file then will depend on what you use (inis, arrays, list-txts, etc.), what/how much data you need to store, if you need encryption or not, etc.



    • The whole game has been paused by setting the global time to 0 and individually giving the menu items have a normal timespeed
    • Selecting menu trees (save page, load page) hides and shows layers and activates and disables groups that control them


    If you are using a custom movement for enemies/player, easier way is probably putting everything you have in your event list inside a group (say "main game")
    and then just enable/disable it when you display the pause menu (can simply be a dedicated layer that becomes visible/invisible)
    otherwise, you can do the same, but also take into account "stopping" all characters and/or preventing user input to be detected (ignore user input).
    "Less suggested" way would be putting the main game in a sub-application, since you can use the builtin "pause" function to pause a subapp and show a menu on top of it from the parent frame.

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    653
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Thanks @schrodinger! Disabling the groups is of course a great way to pause the game, but will it cause issues with, say, enemies that use bouncing ball movement to just go left and right, or counters and timers? Is there a time scaling method in fusion or is it best just to use subapplications to "hold" everything in place?

    Also, does save frame state work like an emulator does? That's all I used in C2, it just loads and saves absolutely everything in it's current state

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It can cause issues with enemies using the Bouncing Ball movement and such, but you can just put everything that uses such a movement into a qualifier and set the game to stop their movement when it is paused, and set it to start their movement when it is un-paused.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    ^ what HGF says

    as for time scaling, there's some "delta time" methods around, but they are user-made,
    I think it would be much more complicated adding this in later stage than stopping builtin movements

    Maybe your best bet is the subapp then, if you don't want to mess with builtin movements, or code your own custom movements for everything.

    Quote Originally Posted by elvisish View Post
    Also, does save frame state work like an emulator does? That's all I used in C2, it just loads and saves absolutely everything in it's current state
    Yeah, like a "snapshot" of the system in that very moment
    I'm under the impression it doesn't, and I've heard different users suffering from bugs when using it.
    But I've personally never used it,
    and I don't have a clue on what it actually saves, where and how,
    so if anyone is successfully using it I would be curious to hear about this function as well

  6. #6
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    653
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    So, use a subapp for the menu might be an idea. Marvin had an example that I might be able to look at, can you use the subapp to save states from the paused app?

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    653
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Okay, so I've found that you can't test frames with the subapplication, you have to test the entire game. I put all my groups in a group to deactivate, and the bouncing ball movements still move, along with all the animations. I'm guessing there's no other way of accomplishing this?

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Yeah testing is a bit awkward with subapps
    answering your previous question: yes, as long as you make them "talk" each other (sharing values)

    You also have to "stop" your bouncing balls, and stop animations,
    and then "start" bouncing balls, and resume animations when returning back.

    As for bouncing ball, you can easily come up with a custom movement doing the same
    (or better, as bouncing ball is limited to 32 directions, and has no pixel-perfect collision),
    so that will be perfectly stopped when inside your group.
    Same would apply for animations: if you make your own animation system
    (since you wouldn't anyway be relying on builtin movements animation changes by dropping bouncing ball)
    the same will be paused as well...
    so it's *probably* worth putting a little effort in doing those, and you'll have your clean and totally controlled pause system

  9. #9
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)
    elvisish's Avatar
    Join Date
    Oct 2014
    Posts
    653
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    I tried to deactivate groups, and it seems to cause a weird loop, I tried to delay the triggers with firing events and it still doesn't work? I also tried checking if it's activated and deactivating, and that didn't work, is the keystroke catching it too soon?

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    There must be something conflicting in your events,
    activating/deactivating groups should work fine
    if you want/can, post the isse and we can take a look

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 17th July 2014, 07:52 AM
  2. Pause Menu
    By ToffeeandPebbles in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th February 2011, 01:50 AM
  3. Pause/Game Menu
    By dragonguy in forum File Archive
    Replies: 8
    Last Post: 16th October 2008, 04:29 PM
  4. Sub App for pause menu?
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st August 2008, 01:22 PM
  5. In-Game Pause + Menu
    By Kris in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 3rd February 2008, 09:21 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
  •