• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion Your method for working on two different computers? Opinions on git with GMS2?

G

Guest

Guest
After encountering GMS2's "has become unstable" bug a couple times, and then once having my cloud sync software eat half my project by pushing the blank bits rather than pulling the new ones, I've gotten rather paranoid.

Right now I've got a poor system where I use a batch file to timestamp-backup my project to both a local folder and to the cloud-sync folder at the end of every session. Then, if I switch computers, I copy the cloud version to a local folder, work for a while, and then run the batch file to make sure the most recent version is on the cloud.

This is not a good system. Anyone have anything better? Should I just work on local versions on both computers and use the built-in git functions to pull changes from the cloud? If so, any opinions on GM's built-in git interface (which some people on the Reddit forum call a "broken abomination," at least previous versions) versus a third-party GUI? I've got enough to do learning how to program, I reeeally don't want to learn a complicated linux-style tool just to save my game unless I have to.
 

GMWolf

aka fel666
I have not used GIT in GMS2 yet, so i cannot comment on its quality.
But in GMS1.4, it most definitely was completely broken. it was best to use an external tool like Git GUI or GitHub desktop.

I would recoment you give the built-in Git interfce and see how it goes. But if it doesnt pan out, try Git GUI or Github desktop. both are simple to use GUI tool. no command line needed.
 
G

Guest

Guest
Just stumbled on this: https://yal.cc/gamemaker-using-external-version-control/

Think I'll try it, but I'm new to git version control. I assume it will safeguard me against "has become unstable" or other corruption errors by allowing me to roll back to all the same files I had at a prior, stable work session... (please let me know if that's not the case)
 

zbox

Member
GMC Elder
GMS1.4 + Git Desktop = Awesome. Would never use anything else.

GMS2 I haven't toyed with but looks like it can do the same easily.
 

chamaeleon

Member
I use git outside GMS, primarily using TortoiseGit client. My bare git repos that I clone into working copies I store in a folder that is managed by OneDrive (presumably the principle holds for Dropbox, etc.), which means the content is replicated between computers pretty much instantly, assuming network connectivity (which I have 99% of the time). I get availability of the committed and pushed stuff on all my relevant computers, and redundancy in case of any computer failures.
 
G

Guest

Guest
I use git outside GMS, primarily using TortoiseGit client. My bare git repos that I clone into working copies I store in a folder that is managed by OneDrive (presumably the principle holds for Dropbox, etc.), which means the content is replicated between computers pretty much instantly, assuming network connectivity (which I have 99% of the time). I get availability of the committed and pushed stuff on all my relevant computers, and redundancy in case of any computer failures.
OneDrive is the one that ate my project. I stopped working on the desktop computer at 10pm, went to bed, got up at midnight and read the forum on my laptop for seven minutes, went back to bed, then woke up and found that OneDrive had deleted the project files on my desktop at exactly the time that I'd been looking at my laptop---apparently it thought that the lack of files on my laptop indicated a deletion, but I have no idea how or why.
 

chamaeleon

Member
OneDrive is the one that ate my project. I stopped working on the desktop computer at 10pm, went to bed, got up at midnight and read the forum on my laptop for seven minutes, went back to bed, then woke up and found that OneDrive had deleted the project files on my desktop at exactly the time that I'd been looking at my laptop---apparently it thought that the lack of files on my laptop indicated a deletion, but I have no idea how or why.
That is really unfortunate. I would be remiss if I didn't mention I also use CrashPlan for my backup purposes, which of course includes the OneDrive locations among other things (also my working project folders, of course).
 

FrostyCat

Redemption Seeker
Just stumbled on this: https://yal.cc/gamemaker-using-external-version-control/

Think I'll try it, but I'm new to git version control. I assume it will safeguard me against "has become unstable" or other corruption errors by allowing me to roll back to all the same files I had at a prior, stable work session... (please let me know if that's not the case)
It's only the case if you commit frequently enough. Rollbacks are to previous commits, not necessarily work sessions. If you hold off commits by only submitting large chunks or perpetually amending the last one, you're practically still at square one.

OneDrive is the one that ate my project. I stopped working on the desktop computer at 10pm, went to bed, got up at midnight and read the forum on my laptop for seven minutes, went back to bed, then woke up and found that OneDrive had deleted the project files on my desktop at exactly the time that I'd been looking at my laptop---apparently it thought that the lack of files on my laptop indicated a deletion, but I have no idea how or why.
My bet is that your desktop's clock is behind your laptop's. When you switched to your laptop, it sees nothing there and the last-updated time is ahead, so it assumes a delete. Potential for de-syncs like this is the exact reason why I recommend against auto-sync tools in a multi-machine dev environment.

Another reason is that these tools tend to be made for non-technical users, and adaptations for catering to them can also get in the way. For example, there have been reports of Google Drive diddling with the extension on GMS 1.4 project files because it sees XML inside. Automatically sniffing file types might be helpful for your grandma gathering family photos, but getting .html or .xml tacked onto your project files isn't so helpful for you.

If you are a developer, it's better in the long run to learn to use tools developed specifically for developers.
 

Tsa05

Member
I've had shockingly good luck with Dropbox; it's eaten a script once or twice, but never a whole project (and its version history has allowed me to restore the file). Google Drive and OneDrive have both sloppily eaten up files for me multiple times. But, all of that being said, better to commit to a repository than to rely on auto-syncing in general.
 
G

Guest

Guest
So if anyone finds this, I went with bitbucket (free private repository) using Kraken for my git GUI. I recommend Kraken; I tried several GUIs, and they all demanded that I learn something about git, but Kraken is great if you seriously don't give a 💩💩💩💩 and just want to work on a single branch between two computers.

Also, every time I finish a work session, in addition to pushing the changes to bitbucket, I run a batch file called Archive.bat that uses 7zip to make time-stamped archives of my project folder both locally and to my cloud sync folder. (7zip's location is set in my path, you could also just replace "7z" below with "c:\program files\7-zip\7z.exe" or wherever you installed it. My game project's folder is BHSL.)

You make a batch file just by putting the following text in a text document (like with notepad) and then saving it as whatever.bat. Then when you double-click it, Windows runs the commands in the batch file.

Code:
@echo off
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)

@7z a "C:\Users\Justice\Documents\GM (Local)\Archives\BHSL_%mydate%-%mytime%.zip" "C:\Users\Justice\Documents\GM (Local)\BHSL" >NUL
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo ** Local archive FAILED **
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 pause
if %ERRORLEVEL% equ 0 echo Local backup SUCCESS
@7z a "C:\Users\Justice\Google Drive\GM (Cloud)\Archives\BHSL_%mydate%-%mytime%.zip" "C:\Users\Justice\Documents\GM (Local)\BHSL" >NUL
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo ** Cloud drive archive FAILED **
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 echo .
if %ERRORLEVEL% neq 0 pause
if %ERRORLEVEL% equ 0 echo Cloud drive backup SUCCESS
pause
 
Top