Creating a save/load system..

Discussion in 'Game Design, Development And Publishing' started by GamingDragomachina, Jun 28, 2019.

  1. GamingDragomachina

    GamingDragomachina Member

    Joined:
    Jan 2, 2019
    Posts:
    14
    Alright, so i'm gonna come right out and admit it, i am no coder. I am not a math guy. As such, i find myself enjoying to make games while using the drag and drop system. However, i started to work on a bigger more complex game and decided i wanted to have a save progress sort of system. My game is a platformer and i want to save the level the player is at so they can come back to it later. So, can someone please tell me the best way to impliment the save/load system i am seeking? I've heard of a few ways of people integrating coding into the drag and drop format so... any help is DEFINITELY appreciated.
     
  2. Rob

    Rob Member

    Joined:
    Jul 12, 2016
    Posts:
    681
    There's already functions in gamemaker to make saving/loading your game easy (it seems to work like save states i emulators).

    game_save and game_load work fine if you use them correctly but they have their limitations (specifically if you're using dynamic data structures in your game / making sprites during gameplay that need to be saved etc, it won't work) but I'm positive that you're not doing any of those things.

    You'll need some way to trigger the Saving / loading (for example you could use game load when your game first starts up and game save in the creation code of each ROOM level (assuming each room is a level).

    Maybe save whenever the player is spawned?

    You'll also want to use file_exists to see if the save file exists before trying to load it.

    So - no maths required! But what will be required is you to think of exactly when you want the game to be saved and when it's to be loaded.

    It's the same as Drag and Drop really. At what point in the chain of events should you use the functions?

    I'm on my phone ATM otherwise I'd link to the functions but you can just type those names in and add "gamemaker" at the end to see some examples in the manual.
     
  3. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,470
    This is too flaky a way to search. Advice like yours is probably how rookies end up taking advice on GML functions from inappropriate, low-quality places like Wikia.

    If you want to look up a function in the Manual, go to http://docs2.yoyogames.com and use the Index tab. If you want to search for a term in the Manual with Google, add "site:docs2.yoyogames.com" at the back, not just "gamemaker".
     
    BaBiA Game Studio and Rob like this.
  4. Rob

    Rob Member

    Joined:
    Jul 12, 2016
    Posts:
    681
    I accept FULL responsibility for all rookie mistakes. Please file your claim to the appropriate agencies!
     
  5. pixeltroid

    pixeltroid Member

    Joined:
    Jul 23, 2016
    Posts:
    662
    If your'e going to work on bigger and more complex games I strongly suggest you switch to code. I say that as someone who is not skilled at code. The fact it that with code, its easier to find tutorials and help for many features that you would like to implement.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice