Windows Extra Folders in GMS 2 Folder and Github

Discussion in 'GameMaker Studio 2 Community Tech Support' started by samspade, Apr 16, 2019.

  1. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    1,692
    I know that I could test this myself, and I will if no one has the answer, but I wanted to ask first as I'm slightly worried that trying this could corrupt or otherwise mess up my GMS 2 project.

    I back everything up using source control through git. What I want to have is a separate folder in my git repository that I can use to store text files and other assets (design documents, code typed in notepad, and so on). I can think of several ways to do this.

    I could first of all have a second git repo that is unconnected to my backed up project. This is what I'm currently doing. This is kind of annoying.

    Second option would be to create a separate branch that has none of the source code and never use this branch within GMS 2 - e.g. push and pull only to the master branch. This seems doable but kind of a misuse of what branches are supposed to be and also opens up the possibility of a really bad merge.

    Third option would be create a folder in the GMS 2 project folder itself. This seems to be the best way to do it. Can I create new folders in the GMS 2 project that is unconnected to the project itself or will that cause issues within the project?

    Or is there another way to do this?
     
  2. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    699
    Fourth option would be to use external source control (easy to setup with gitlab or bitbucket and github desktop). You can then have a parent folder in which you have the gms2 project and other subfolders for project related files.
     
  3. ElegantMistake

    ElegantMistake Member

    Joined:
    Mar 5, 2019
    Posts:
    10
    This.
    I have no idea how GMS works with source control but for all my projects I use Bitbucket (which has free private repo's) and Sourcetree as my git client.
    Just git init the root of your project where you have multiple folders inside (project, resources, ...)

    I strongly recommend following the gitflow as your branching model
     
  4. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    1,692
    As far as I know, there is a bug in GMS 2 that can kill a project with multiple branches, so unless that is fixed, I don't really want to do the full git idea, though I'm waiting for when it is so that branches and especially working easily with other people is an option. See: https://bugs.yoyogames.com/view.php?id=29196.

    GMS 2 also has a source control drop down menu and commit option, which is generally what I use, though I use gitbash to push it to github. If you were to do this idea, can you still use the the drop down menu built into GM or will that cause errors? In other words, will I need to switch completely over to gitbash?
     
  5. ElegantMistake

    ElegantMistake Member

    Joined:
    Mar 5, 2019
    Posts:
    10
    It seems the biggest problem is merging branches and being unable to fix the merge conflicts due everything being a code mess(?)
    I'd advise not do any merging/branching then until that is fixed, however the point still stands that you handle git on your own rather than GMS (I don't know where GMS inits the repo).

    So if git is initialized in the project folder of the game, I wouldn't recommend messing around there but rather having a parent folder where my git is initialized with multiple subfolders (including a resources folder). If this is possible in GMS, sure do it there!
    However i'd use one remote origin to push my code to so it depends where GMS inits the git folder
     
  6. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    1,692
    If you use the drop down menu inside the GMS 2 IDE it creates the git folder in the GMS 2 Game Folder Which GMS 2 creates with every game. You can commit, push, and pull directly from the GMS 2 IDE but I've had crashes with pushing and pulling so I only ever commit - which as far as I can tell works just fine - and then I open gitbash and push.

    I don't know if GMS 2 will like me putting the game folder inside of another folder, but I will experiment with a dummy project and find out as this is pretty much exactly the result I want to achieve.
     
    ElegantMistake likes this.
  7. Mick

    Mick Member

    Joined:
    Jun 30, 2016
    Posts:
    699
    One of the reasons it's better to use external tools, built in source control in GMS has always been buggy (no offence YoYo).

    It will work fine. I have been meaning to make a tutorial to show how easy it is to setup source control entirely outside of Gamemaker Studio (Bitbucket + GitHub Desktop), but I haven't fount the time yet.
     
  8. Jobo

    Jobo GMC Member YYG Staff

    Joined:
    Apr 19, 2016
    Posts:
    307
    Your project lives inside a folder that contains a *.yyp file (your project file).
    GMS2 manages subfolders in that folders for each resource type (sprites, objects, scripts, datafiles, datafiles_yy, etc.)
    Beyond that, it's a completely normal file directory.

    The answer is yes, it's a normal folder, you can put whatever you want wherever you want as long as you don't put it into folders that are tied to resources in your project (deleting a sprite deletes its folder).
     
    samspade, Pfap, Mick and 1 other person like 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