GMS 2 Backing up all code?

Discussion in 'Programming' started by CheeseMyBaby, Dec 13, 2018.

  1. CheeseMyBaby

    CheeseMyBaby Member

    Joined:
    Dec 5, 2018
    Posts:
    60
    Evening!

    I'm one of those weird people who like to have all my code backed up in separate files.
    Is there a way of doing that in GMS2?

    (Copy/pasting eeeevery single piece of code in every object and event is.... no fun.)
     
  2. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    1,931
  3. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    6,566
    What's wrong with just exporting the project and uploading the file somewhere?
     
  4. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    1,931
    I also do this sometimes, but the nice part about git/github is you have access to the actual code without being in Game Maker. You can look your project over on your phone if you want.
     
  5. CheeseMyBaby

    CheeseMyBaby Member

    Joined:
    Dec 5, 2018
    Posts:
    60
    Absolutely nothing wrong with that of course. I just want to be able to read the code. I haven't come very far yet (in terms of learning how to code) and I want to be able to reread, analyze the code on the fly. To be able to try to make it better.

    That is precisely what I want. I'll look into it. Thanks!
     
  6. CheeseMyBaby

    CheeseMyBaby Member

    Joined:
    Dec 5, 2018
    Posts:
    60

    I followed that example and it’s been working like a dream.
    I have another question now though... how do one go about downloading everything in its entirety?
    My computer just caught fire and although that’s a really bad thing I managed to push every last change onto bitbucket. But... how do I get the project onto a new computer?
     
  7. TheSly

    TheSly Member

    Joined:
    Jan 16, 2017
    Posts:
    890
    If you're using source control, you've been pushing the content to an online server. Now you need to set up your source control again on the new PC, but this time you need to pull the content. I use sourcetree as a gui front end for bitbucket, which makes it all pretty easy to use.
     
  8. Ido-f

    Ido-f Member

    Joined:
    Feb 19, 2018
    Posts:
    106
    I'm not sure you can actually use the pull function in a new computer straight away.
    I think you need to use the "clone repository" function first (also doable from GMS2 source control menu).
    It will download the project from git and connect with it so you can start pushing and pulling again.

    edit: that's only doable after you've added the project's path and password in the new computer's GMS' preferences->plugins->source control.
    The project path can be somewhat tricky to find, mine at bitbucket are structured like this: https://user_name@bitbucket.org/user_name/project_name.git
     
    Last edited: May 14, 2019
  9. CheeseMyBaby

    CheeseMyBaby Member

    Joined:
    Dec 5, 2018
    Posts:
    60
    @TheSly && @Ido-f
    Cool. I just got the replacement computer and will look into it as soon as I got all work related stuff sorted out.
    Many thanks for your answers!
     
  10. CheeseMyBaby

    CheeseMyBaby Member

    Joined:
    Dec 5, 2018
    Posts:
    60
    @TheSly && @Ido-f
    It worked like a charm!
    I cloned the repo, reinstalled GMS2 and was good to go.

    @samspade
    Your original post in this thread just saved me from losing 1000+ hours (literally) of work so the biggest possible thank you to you! <3
     
    samspade likes this.

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