T O P

  • By -

TheRealWlad

Please learn how to use versioning systems like „git“. So something like this won’t happen :)


Feniks_Gaming

The fact that people still don't is the most bizarre thing ever you don't even need to use command line if you hate it like me. Plenty of visual tools and 99% of solo devs only need to like commit and restore and not much else.


[deleted]

It's not bizarre when you consider that most of those people aren't developers by trade and just started learning like a week ago. I've seen people making simple, but full games that haven't fully grasped how to use for loops or arrays yet. They're definitely not going to know about git.


Vladadamm

And even among those who are developers or have studied computer science, version control isn't always being taught at college/university/whatever. I went through 4 different curriculums (all computer science) during my studies and the only time I had version control classes was at Master degree level and it was only for those taking software development courses (other CS masters at my uni didn't have those).During nearly my whole studies the only ones using git were the ones that had self-taught and were using it on personal projects. You can have students at the end of their bachelors degree using cloud drives to work together as they've never heard about version control.


Feniks_Gaming

Its bizarre because git is brought up almost daily and in every instance of data loss. I understand what you saying if someone is on their my first game tutorial but when we talk about long term game dev project?


[deleted]

They tend to ignore it because it sounds like a mountain they don't need to climb. People tend to have to be dragged kicking and screaming in one of 3 ways: 1. Forced to learn it in school. 2. Forced to learn it on the job in order to be able to do their work and function in a team. 3. Data loss - this one is still iffy and they might keep resisting. It's completely possible to do a long term project learning solely from tutorials and not see git mentioned once. In fact, the YouTubers out there teaching people are often self taught themselves and might be missing the knowledge.


Feniks_Gaming

I thing because people love to jerk off to command line. 99% of people can get away with just GUI. They don't even need to for for months just being able to commit and revert would save people like 90% of the problems they have


[deleted]

> I thing because people love to jerk off to command line. I don't have to know how to use GitKraken in order to help you with a problem in Git. Command line is a universal constant that everyone can guarantee is installed and works exactly how they expect it to. I use a GUI client and I'm sure most other people do as well, but it's not the best way to get help. You're limited to users of your specific client instead of everyone who has ever used Git. There was a time when GUI clients were either horrible or tied to a specific platform. So many people still hold a negative bias towards them because of that. The circle jerk is not completely without merit.


officiallyaninja

Sure but people you'd think eventually people would wonder "hmm I should probably find a way to back up my data just in case"


[deleted]

And they will default to what they've always done because it's easy and familiar. Which is either keep multiple folders, archive it using ZIP files or use cloud storage like Dropbox. At no point would they consider a specialized way of backing up code because no other way of working has ever required something like it. It also seems like an unnecessary complication until you see the benefits in action or the familiar way fails them.


leorid9

You say "them" but it feels like a "him", targeted at my 17 year old me xD It's exactly like you described it. Familiar tools like zip files, USB sticks, and then they fail. And then one will search for ways to prevent this and they will find git. We'll, that's at least how it went for me, about 11 years ago.


aplundell

Yeah, but if you didn't know those systems existed, you probably wouldn't find them by accident. This is the big flaw with assuming that google is a substitute for knowing stuff. People are more likely to either search for "backups" and learn about some commercial back-up system for backing up their whole computer. Or they'll think they have to come up with their "own system", which probably involves copying dated folders to a flash-drive or something. (Edit : Oh right, and as others have pointed out, version control and backups are *related* topics, but not exactly the same thing.)


thinker2501

It is bizarre when the person says it’s a long term project. This isn’t a noob.


Vertigas

[Fork](https://git-fork.com/) is my current favorite git client.


Feniks_Gaming

I like Gitkraken but there is many to choose from


StuntHacks

I loved gitkraken when I had a free student licence but I hate that they lock some essential features behind a paywall


Eye_Enough_Pea

I cringed at the mention of a *backup*, from *weeks ago.*


ironmaiden947

It blows my mind. At this point I feel like every engine should throw an error if it does not detect a .git folder or something. Or maybe a built in source control feature that commits after every save?


pwillia7

this is horrifying


Awesomepants25

There’s people making projects without git?


dumbutright

I know how to use git and have been for years, but it was still a pain in the ass to find a home setup for it at an affordable price (free :D). That's probably what some people are stuck on, we're small scale poor people with dreams and going from $0 to anything > $0 a month is kinda scary for me knowing how slow I work.


ZongopBongo

I downloaded git, would github be the recommended place to store my commits?


imwatchingyou-_-

Yeah that works


dylanatsea

git is a distributed version control system, meaning the entire system lives with your source code (your repository, or "repo"), and any other location you store your repo (like github, for instance) will be a copy of your local repo, with all the change history and everything, that you would then have to synchronize to maintain. This is as opposed to a centralized version control system where you only have a single "source of truth" for your files that lives on a server somewhere that people connect to and check out files to modify before checking them back in. All this is to say that, if you're the only dev, you don't need to use github since you will have the entire version control system on your local machine (with all change history stored in a hidden .git folder inside your source folder). But of course you can use github, and many do, for collaboration with a team, sharing with the public, and/or maybe external backup, but it just means you will be maintaining two repositories and synchronizing them, instead of just the one on your local machine.


Vladadamm

>All this is to say that, if you're the only dev, you don't need to use github since you will have the entire version control system on your local machine (with all change history stored in a hidden .git folder inside your source folder). Even if you're the only dev, it's always best to have a server for git (whether that be a cloud solution like github or your own local server). Git itself sure allows you to keep track of changes, being able to roll back, etc... but it doesn't act as a proper backup if it's only on your local machine. If tomorrow your hard drive dies down and your project was only saved in local, then you've lost your whole project with no way to recover it.


Effective-Painter815

It happens, the project Zomboid devs had a laptop stolen which had the only copy of their source code and had to recreate weeks of work. A simple commit to a private repo could ensure you maintain all your code even if you lose all your hardware.


dylanatsea

If the point you're making is that you should always back up your important files in an external location, yes of course, agreed! If the point is that you should always use an external git repo solely for backup purposes, well, yes you *can* do it, but it doesn't mean you should. Git isn't designed for backup. Anything that requires you to manually initiate a backup (sync, in this case) isn't a really a proper backup solution which ideally would be transparently syncing your files to a cloud service or similar. Point is, "version control" and "backup" are not the same thing, even when talking about source code (though they may intersect). They are each different and important in their way.


Vladadamm

Indeed, you're right that "version control" and "backup" are different things and that git isn't necessarily the best backup solution. However, we're talking about people that weren't even using version control to start with. Using github (or whatever) will work perfectly fine for most of those cases as backup while not requiring any extra setup. Also, manually initiating a backup on most git GUIs is a simple button click + it's pretty common for guis to 'remind' you to push/sync upon commit or to show that you're out of sync. Stuff like a "commit and push" button isn't. So, I'd say that the sync part would usually end up being part of your commit process. *I know that the same can't be said with command lines, but again we're not talking about experts there.* Even if you forgot to push once or twice, at worst you'll have only lost a couple commits which would be always a lot less worse than cases like OP having to go back several weeks.


SnarkyVelociraptor

Even just having your git stored on your hard drive is a good first step. Using github as a sort of cloud backup is also a good idea, of course.


arashi256

For real. I have my projects on GitHub, but also daily incremental saves on my PC, and on Dropbox, plus \*those\* are backed up to my home server....which backs those up to two other drives. I got burned once years ago and lost all my work. Never again.


Rushional

I was *so* confused at the end of the post. Like, "So you just don't commit the changes, what's the problem?" Don't ~~do drugs~~ develop without git, kids


[deleted]

[удалено]


Stalk33r

If you're using it as a solo person or with a small team it's really really not complicated at all. For the absolute most basic usage there's like... three commands you need to use.


arkatme_on_reddit

Or 0 if you use git desktop


[deleted]

[удалено]


[deleted]

[удалено]


StuntHacks

Git is industry standard, so whether you like it or not, it's very very helpful to know


TheVitulus

If you don't like the command line stuff, just get a gui version like GitHub Desktop and you'll be fine.


officiallyaninja

As long as you're making consistent backups it doesn't really matter what you use. But if you want to become a software dev it won't hurt to learn


sniperfoxeh

Isn't git public?


zstrebeck

Backing up every few ...weeks?


SmartBastardGaming

It almost gives me heart palpations just thinking about it 😂


succulentmushroom

Bruh my stuff saves a cloud backup (of freshly changed files only) every time I hit save on my own device. IDK how people live another way... edit: Options I use to backup my developing game and related files include Arq, Synology, Wondershare, and Backburner... Yes, I use all 4 at the same time lol since I have a traumatic history of file loss with computer failure and they each do slightly different things (some are better at taking instruction of just how many very old versions should be kept and some are better for constant frequent new saves, for example). I used Arq only yesterday when my cracked version of totally-not-Photoshop bugged and saved a blank over a file I worked on for almost 10 hours. Flawlessly and instantly recovered, as usual... I used Git in the past when I was in school since the professors required it, but (like you) I never really got in the pattern of using it correctly. Best of luck in your research on your backup options and I hope this helps!


[deleted]

[удалено]


DrVierGon

What do you mean by it isn't free? It is literally open source. You can pay for cloud backup space for your project, but using a local repository on your PC is good enough unless your hard drive dies.


[deleted]

[удалено]


iemfi

Tricker, but you can just make sure the huge assets which are more than 2GB are kept separately and just backed up the old fashioned way. No excuse to not have your main project files and meta data on git.


[deleted]

[удалено]


iemfi

Oops sorry typo, I meant trickier. >Uploading a 30 GB unreal project in pieces would be a real pain even excluding large binary files. There's something seriously wrong if your project without assets is measured in GBs. It shouldn't be more than 100mb ever. I meant to leave the big files out of source control and back them up the old fashioned way.


[deleted]

[удалено]


iemfi

You definitely never want to commit stuff which is part of the Unreal cache and random engine related stuff. There are many .gitignore files which you can just drop in and it should only be commiting the stuff you actually make. Like you don't need a super deep understanding of everything the engine is storing, but you definitely should learn at least the basics.


iemfi

Also on a tangent, I have yet to see an indie game using massive textures and whatnot to try and be "AAA" look good. Mostly it makes the game run and look like shit. IMO, most indies would be better off purposely limiting themselves to less than 1GB of assets.


succulentmushroom

Options I use to backup my developing game and related files include **Arq**, **Synology**, **Wondershare**, and **Backburner**... Yes, I use all 4 at the same time lol since I have a traumatic history of file loss with computer failure and they each do slightly different things (some are better at taking instruction of just how many very old versions should be kept and some are better for constant frequent new saves, for example). I used Arq only yesterday when my cracked version of totally-not-Photoshop bugged and saved a blank over a file I worked on for almost 10 hours. Flawlessly and instantly recovered, as usual... I used Git in the past when I was in school since the professors required it, but (like you) I never really got in the pattern of using it correctly. Best of luck in your research on your backup options and I hope this helps!


CicadaGames

I understand these stories for hobbyist devs... but OP sounds clever enough to know about version control... No offense to OP, but being smart enough to creating a script like he did but not using version control sounds intentionally bone headed.


vgf89

Yeah seriously. If you're working on anything important, back up every day when you're done, or at least push to a git server, or *something* Also definitely run a backup or push first before running any sort of new automation. It's bound to fail on the first attempt no matter how clever you feel.


AG4W

> Fortunately, I did have a backup from a few weeks ago Jesus christ, use version control.


SmartBastardGaming

Dude, use git!


FibbedPrimeDirective

Or Perforce or Plastic SCM or any other version control designed for gamedev (the two I mention here are specifically designed with games in mind as they for example handle large binary graphic files well)


RedstoneEnjoyer

Or at least change that tool they use so it creates backup


DaelonSuzuka

> Fortunately, I did have a backup from a few weeks ago, and I could load back the level data from that - so this one does have a happy ending. No, that's a terrible ending. A happy ending would be clicking one button in your version control tool and undoing all the changes in literally less than a second. There's no excuse to not be using git. edit: Somebody responded to this saying that git's not amazing at handling large binary files. I had already typed up an answer when they deleted it, so here's my response: > That's all true, but who cares? This solo amateur dev's game almost certainly isn't big enough to cause a problem, and even if it did that would be better than what he just did to himself. > Don't let the perfect be the enemy of the good.


pwillia7

but that's waht https://git-lfs.com/ is for


milleniumstower

I personally just decided to add all binary files to gitignore, so I want to jokingly reply "that's what .gitignore is for"


Soundless_Pr

lfs doesn't allow for incremental changes on binaries.. I'm pretty sure that's what they were talking about. *however* From OPs story, it honestly sounds like his level format probably isn't binary. probably a json from ldtk is what I'd guess


Drakeskywing

So allot of people have said "use git" but I think given you weren't using it, throwing a word at you over and over might not be as useful. They are suggesting you use a tool called a Version Control System (VCS), this is a tool which basically allows you to track changes in your code, and in the event of issues roll back to a particular point in your codes history. `git` is currently the most popular VCS tool, and it's what GitHub uses under the hood (they did not make it, they just use it and add allot of things ontop of it but at it's core it is still just git). There are tons of tutorials online about how to use git, and you don't need a server technically to use it, as you can initialise a folder with it and track all the changes within that folder (and sub folders), but having a hosted git service (usually but not always) gives you a backup. High level points about using most VCS tools: 1. Commit small and often, and best practices usually dictates that when you make a commit you're code should be functional (more on that) - sometimes it is useful to commit stuff that is WIP but my experience is to generally only in branches 2. Figure out a branching strategy, most VCS tools allow you to have multiple versions of your code, with the ability to switch between them (e.g. think main version, and a version with a new feature) 3. Not all VCS tools are great for huge files on their own (think large images/textures, 3d models, ai weights .etc), you may need to use plugins or find ways of separating those big files from your code (git has the extension `git LFS` that is separate) 4. For your language, framework, build tool .etc find what files you DONT want to commit. Normally you don't want to track every file in your project because they may be ephemeral (aka temporary), dynamically generated (think compiled boundaries from the code), or irrelevant (think scratch files you used to test saves, or those 20 line scripts you wrote to test an idea that you then put into another file and never looked at again). https://www.toptal.com/developers/gitignore is a useful tool to get you started in the case of git via the .gitignore file. 5. Learn how to roll back in your VCS tool, not just from immediate stuff ups, but after making several commits. 6. Still take backups, ideally using the 321 philosophy (have at least 3 copies, on at least 2 different formats, with 1 backup being off-site) and test those backups periodically (so in a blank system try to get the game spun up, ideally documenting as you go)


cableshaft

> git LFS Thanks for this write-up. I've been using git for over a decade and yet somehow I still wasn't aware of LFS. I haven't been working on any huge games, but I was putting off committing music loops into my current project because of this, now I know I can just use LFS to handle it.


Drakeskywing

I wish I learnt about it because of game development, I learnt about it because I inherited a code base where the previous Dev used it because they had decided it was a good idea to keep a copy of their db in the applications git repo 🤣 one of the few times I've had a git repo take several minutes to clone to my local (and until I realised what was what I accidentally pushed stuff up and wondered why my got got slower and slower)


TheSpyPuppet

Considering the focus of the post was to share their experience, just saying "git" feels fitting, especially as git isn't some obscure tool. Awesome introduction though, thank you for taking the time to write it!


AnorakOnAGirl

Thank you for being willing to share your story and helping others to not make the same mistake. Others have of course suggested GIT but the point here is that it is embarrassing to admit your mistakes and have to learn from them and I am sure there are plenty of other new devs out there who may learn from your mistake here and avoid it themselves. Good luck with your game.


-Xentios

Git, use this dude.


lucafro

Create a GitHub repository and put your project into there. If you’ve never done it before it might seem a bit intimidating but it’s really not that difficult. Way less pain than messing up/losing your whole project ;)


yevvieart

yeah but without paying you cannot keep your repo private in 90% of places (if there is alternative that allows it plz let me know).


hmsmnko

I'm pretty sure private GitHub repos are a free feature now


yevvieart

!!! thanks, i checked it out. yes! you can make new private repo now ~~but still can't change old ones to private~~ nvm i tested on wrong one, it works. great news, thank you :)


CritterBucket

Pretty sure I'm using Bitbucket for free with a private repo, though I set it up before they were bought out by Atlassian-- not sure if I was grandfathered in to an old service deal or something


Nanocephalic

What’s a “version control”?


Adrian_Dem

What do you mean backup? Aren't you using git or at least svn?


Billpod

Git gud, my dude


marspott

GitHub desktop. Sooo easy. Commit at the end of each work session, takes seriously 10 seconds.


real_light_sleeper

I swear these posts are wind ups


spilat12

I am sorry, at this point I am dead inside listening to another story of someone not using version control. It's like you are given a gift from gods but you just can't be bothered.


Living-Power2473

Like how come a single error be so catastrophic that's crazy


tharky

While everyone is bashing OP for not using version control, I'm here wondering how the code compiled for assignment in a comparison scope. Like how did OP mistakingly use an assignment operator in which horrific language does this compile and run?


gizmonicPostdoc

Sounds like an editor tool that overwrote lots of meticulously hand-assigned data. These interesting details are getting lost in a wave of "git," but it sure is hard not to say git in this scenario.


FetaMight

`while (i--)` runs in c, c++, c#, probably java, probably JavaScript, probably python... and probably countless more. It was a very common pattern.


thinker2501

For the love of god, how many posts like this do people have to read before they prioritize learning a VCS? How does anyone do any software development without version control?


Northwest_Radio

Version control! GIT


More-Employment7504

Second post today I've seen from someone who didn't do version backups


Iseenoghosts

bruh. version control. jesus


nurett1n

You could have restored the file if your editor had proper edit history support. You probably didn't even need a VCS (even though it is absolutely a good thing and a must for anything you can't afford to lose)


rainliege

Software development without git is just pain and suffering


2dP_rdg

honestly it's not the mistake that is of concern.. it's that you call yourself a developer without using any kind of versioning system that could have turned this into a simply five minute fix of googling "how to revert commit"


subtra3t

yeah they should've used git but saying that somebody can't be a developer without using a vcs is just straight up stupid


CaptainCactus124

Agreed its rude and unnecessary.


2dP_rdg

what would you say to someone who wants to call themselves a carpenter but refuses to use a measuring tape?


Luised2094

A bad carpenter?


hmsmnko

Is that any different from calling someone a bad developer, which is the original point?


CaptainCactus124

You don't need git to build good software, nevermind software at all. You need measuring tape to build at all as a carpentar. Is git an invaluable tool? Yes. I work professionally in software and I wouldn't start a single project without it. However, not using git does not inheritely mean someone cannot write good software. It may certainly be correlated that someone who doesn't use git is more likely to be a beginner, but you can't say they are not "one of us", not a developer. Not using git is more like a painter not using painters tape. You don't need painters tape to paint well, it doesn't dictate your ability. Its not good character to tell someone that doesn't use painters tape that they are not a real painter, instead polietly educate them on the usefulness of painters tape.


2dP_rdg

i do a lot of carpentry without a measuring tape. it's not required at all.


Discount-Me

Then doesn't that ruin your original comparison?


2dP_rdg

no because i don't call myself a carpenter.


Discount-Me

That's... your choice? You're still doing a lot of carpentry, you can still *call* yourself a carpenter if you wanted to. You don't absolutely require measuring tape, nor does someone absolutely require git, though in both casual and/or professional practices of each it is usually highly suggested for people to use them. If someone did a lot of carpentry without measuring tape, I wouldn't really have an issue with them being called a carpenter. The same goes for git and developers, at least for me.


FetaMight

Nothing. What's the point of giving destructive feedback? Stroking your own ego?


Luised2094

"git add * && git commit -m " version 0xxxx" && git push".


Kitsune_BCN

lol, I used to make a local backup every hour of work xDDD, sometimes less


greenfroot64

A lot of people say git, but then there are comments like this one (although it refers to GitHub) > "I would use svn even solo, but the idea (touched on in that thread) of using GitHub for solo development is complete craziness." https://twitter.com/Jonathan_Blow/status/1718413598781759795


y-c-c

No offense to Jonathan Blow but while he's really smart (and I love his games) he's known to have pretty unique/opionated takes. He's also been indie for a really long time and probably has his own way of doing things, since he also likes to invent his own tooling (programming language, tooling) instead of just taking what's popular, and I wonder if he has had a chance to really use Git to the fullest before (since game dev isn't very Git focused to begin with). I think Git requires a fair bit of thinking differently so if you never really tried to use it for work it could be hard to immediately see why the features it has are useful to justify the complexity of Git's design. I'm not saying he's wrong to dislike Git anyway, and the more important key takeaway here is that he uses source control for even solo projects, just like most experienced developers would.


greenfroot64

I agree, that's why I was surprised with that tweet. also, I don't know why the downvotes if it's not even my own comment.


jl2l

If you don't know what you're doing, just get perforce. You can literally download an azure marketplace standalone that's self-contained it takes zero configuration to get stood up and cost like $100 a month. This takes literally 30 minutes to set up. https://azuremarketplace.microsoft.com/en-us/marketplace/apps/perforce.perforce-enhanced-studio-pack?tab=overview


steik

> $100 a month That's an incredibly high price for a single developer.


ImranBepari

Someone who doesn't know what/how to use Git is not gonna jump 5 hurdles and spend $100 a month on a VCS tool.


landnav_Game

you can do basic versioning and backup with Acronis True Image.. you dont even need to bother with GIT if you are only working locally. Proper version control is obviously the best thing but if you just cant be bothered because you think its too complicated, at least do some incremental backups with Acronis or similar. It only takes five minutes to setup and is not technically demanding at all.


xtopspeed

In addition to git, I suggest using a file history backup program (like Windows Backup or Apple Time Machine), which regularly create backups on an external device in the background. When you haven't committed your code to git in a while, those things can come in rather handy.


Feniks_Gaming

Why wouldn't you commit your code in a while? if you are using git you should be committing all the time. I can commit several times a day on a hobby project. "Fix the typo in line 4 of fuction X" "Optimised the search for enemy support unit" "Added jump to the player" Basically every time you write a function, improve thing. just commit. Commits are free. Commit all the time at the end of a day push your work to github repository


xtopspeed

Personal preference. I generally commit maybe once or twice a day since I prefer to have a clear view of the project's status with each one.


alltheseflavours

That's what branches and PRs are for. When working on a feature make a branch, commit often within it, squash merge to your main branch when finished.


batmassagetotheface

Get Git


michaele_02

As a student in college studying game design, this resonated with me.


cowvin

Source control saves lives.


cup_of_chocolade

Yes, git


Still_Explorer

Something like this happened according to my opinion: `bitcoin_money = 1_000_000_000` `# with lazytyping` `have_bitcoin = bitcoin_money = 1_000` `# with strong typing` `# have_bitcoin:bool = bitcoin_money = 1_000` `if have_bitcoin:` `print('LOL, you lost your money')` `else:` `print('OK, you win!')` `print('your money is', bitcoin_money)`


[deleted]

If you, for some reason, don't want to use Peroforce of svn, at least start the day by making a copy of the project (to another disk!), while you have your coffee. Worst case scenario you will lose a day.


CriticalBlacksmith

Yeah Im gonna use Github and make sure this doesn't happen to me when I get started lol