TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Mercurial with Largefiles: Why it is not a solution for game development

50 pointsby nochover 7 years ago

11 comments

pjc50over 7 years ago
Important point here is that if:<p>- you have lots of large files which are not amenable to diff and change frequently;<p>- everyone is working within the same company, and usually on the same network;<p>then a DVCS is unhelpful because you have to spend the disk cost for the repositories on every machine having a full copy of everything that&#x27;s ever been checked in, regardless of whether they need it or not.<p>Many games are tens of gigabytes when shipped. It&#x27;s easy to imagine a process which accumulated hundreds of megabytes of asset changes every single day over a multi-year development process. Then you can imagine having to have expensive terabyte SSDs just to work on it with all your tools.<p>I&#x27;m actually looking at this problem at work for possibly converting a large repository from svn which is a decade old and merely tens of gigabytes. Frankly svn handles it just fine so I&#x27;m going to defer the problem until I absolutely have to migrate.
评论 #15839558 未加载
评论 #15839947 未加载
vostok4over 7 years ago
I actually setup a small studio to work exclusively on a Mercurial largefiles-based VCS. I would say its one of the best solutions today on the market for self-hosted free users.<p>Why? Perforce&#x27;s integration to Unity is quite poor (they have a huge untapped market here), so you end up having to resolve a lot of things slowly in their tools. Git&#x2F;HG are much faster in my experience at detecting changes and interacting sanely with them. Also the team could never learn why a file is checked out, why can&#x27;t they commit, etc.<p>We regularly clean out our largefiles cache on disk, so most of the time everyone just has the latest version of a given binary file on disk. The server of course has every revision, but I want that.<p>And most important of all: with small tweaks we&#x27;re able to use Phabricator for all of our task management&#x2F;documentation workflow. Getting VCS hooks out of the box to let artists say &quot;Adding typewriter model, please review T555&quot; in their commit and having that task automatically get assigned to the reviewer is priceless.<p>Most of my team doesn&#x27;t have any idea what VCS is, but they&#x27;ve learned to use TortoiseHg (they call it &quot;the turtle&quot;) and Phabricator to organize ourselves.<p>While Mercurial isn&#x27;t the only way to get there, its free, its fast, its simple, and it unlocks the power of Phabricator (so does Git+LFS I believe).<p>So in my experience, I would say hg+largefiles is an excellent solution for game development.
zubspaceover 7 years ago
The only free option with unlimited storage seems to be Microsoft TeamServices with Git-LFS support. (1) (2)<p>I have been using Bitbucket and Mercurial for all side projects of mine for quite a while. But when you start with game development, you will reach the repository limits quite fast. Textures, meshes, sound, music, concept art and other binary blobs eat alot of storage.<p>Git-LFS is a bit a pain to setup, because you need to define <i>before</i> checking in, which extensions need to be stored as large file. And then there are check-in hooks, which sometimes did seem unreliable. Visual Studio git integration is also quite limited, but SourceTree did serve me well.<p>It&#x27;s quite liberating if you&#x27;re able to check in code and assets together without taking into account the space needed.<p>1) <a href="https:&#x2F;&#x2F;blogs.msdn.microsoft.com&#x2F;devops&#x2F;2015&#x2F;10&#x2F;01&#x2F;announcing-git-lfs-on-all-vso-git-repos&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blogs.msdn.microsoft.com&#x2F;devops&#x2F;2015&#x2F;10&#x2F;01&#x2F;announcin...</a><p>2) <a href="https:&#x2F;&#x2F;www.visualstudio.com&#x2F;vso&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.visualstudio.com&#x2F;vso&#x2F;</a>
luckydudeover 7 years ago
BitKeeper solved this years ago with one more centralized servers that hold the binaries. When you clone you only get the tip but you can retrieve any version you want when you need it. Scales to terabytes easily.<p>Free and open source (apache v2) at <a href="http:&#x2F;&#x2F;bitkeeper.org" rel="nofollow">http:&#x2F;&#x2F;bitkeeper.org</a>
corysamaover 7 years ago
Blizzard gave a great GDC talk titled “The Data Building Pipeline of &#x27;Overwatch&#x27;”. It covered their in-house, http-based asset distribution system.<p>Take-aways: <a href="http:&#x2F;&#x2F;seanmiddleditch.com&#x2F;my-gdc-17-talk-retrospective&#x2F;" rel="nofollow">http:&#x2F;&#x2F;seanmiddleditch.com&#x2F;my-gdc-17-talk-retrospective&#x2F;</a><p><a href="https:&#x2F;&#x2F;twvideo01.ubm-us.net&#x2F;o1&#x2F;vault&#x2F;gdc2017&#x2F;Presentations&#x2F;Clyde_David_TheDataBuilding.pdf" rel="nofollow">https:&#x2F;&#x2F;twvideo01.ubm-us.net&#x2F;o1&#x2F;vault&#x2F;gdc2017&#x2F;Presentations&#x2F;...</a>
LeoJiWooover 7 years ago
Pretty interesting.<p>Game Development seems to have such a different workflow than most of the stuff I&#x27;m familiar with like backend, web dev, and the occasional network programming.<p><a href="https:&#x2F;&#x2F;gamedev.stackexchange.com&#x2F;questions&#x2F;480&#x2F;version-control-for-game-development-issues-and-solutions" rel="nofollow">https:&#x2F;&#x2F;gamedev.stackexchange.com&#x2F;questions&#x2F;480&#x2F;version-cont...</a> This link recommends peforce as the standard .<p>What do people in the industry actually use ?
评论 #15839184 未加载
评论 #15839181 未加载
b0rsukover 7 years ago
For 2D graphics, SVG (and more generally vector graphics) fit very well in git. For 3D, there are models, but there&#x27;s still the problem of textures.<p>Is there anything close to a text-based procedural texture format ? Textures could be procedurally generated at startup and transformed into bitmaps. I am aware of kkrieger, but is there anything other than proof of concept ? No one takes voxels seriously anymore...
kuschkuover 7 years ago
I’ve been checking in gigabyte large assets into my git repos with Git-LFS and self-hosted GitLab, and it’s been working fine for now.<p>Are there any issues with this approach I should be aware of, considering that Hg with Largefiles seems to have some, too?
评论 #15839803 未加载
twicover 7 years ago
&gt; Okay, so once we have started, the most important thing to know is: This does not in any way change how Hg handles files in memory. [...] Hg has to take the file and consume many times more memory during the commit then the size of the file, to try to figure out what the differences are.<p>This isn&#x27;t true. Largefiles aren&#x27;t stored as deltas, but as complete blobs. Mercurial still reads them in their entirety, so it still uses a lot of memory, but it&#x27;s not diffing.<p>&gt; The next problem is everyone collaborating on the project would have to take a huge Pull with the new large files, for every version of the large file <i>they don&#x27;t yet have</i> [...] if you want to go back to a revision you haven’t pulled yet and the Server is not up you’re out of luck. That means you should get all the commits at some point anyway (because you want all the code versions at your side), so what’s the point?<p>Largefiles&#x27;s <i>mechanism</i> doesn&#x27;t require that you download every version of every large file. That&#x27;s a key part of its design. If you decide that as a matter of <i>policy</i> that you want to download them all anyway, then no, largefiles won&#x27;t help much.<p>&gt; Well, they handle files by placing them outside the repo, and storing only the hash of the file in the repo itself (all bigfile hashes inside one file). This has an unfortunate effect that you won&#x27;t be able to tell which exact bigfile&#x2F;largefile has actually been modified when looking in the history – the only thing you&#x27;d see in the repo is the cumulative file that holds the hashes of all bigfiles as having a change.<p>This isn&#x27;t true either. Largefiles stores the hashes in separate files, and the history machinery is able to interpret the records properly.<p>I&#x27;ve written a little script to demonstrate the structure of a largefiles repository:<p><a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;snippets&#x2F;twic&#x2F;7eeAxy" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;snippets&#x2F;twic&#x2F;7eeAxy</a><p>One thing that would be really useful that largefiles doesn&#x27;t (that i know of) do would be to opt out of downloading some largefiles at all. If i&#x27;m checking out an old revision just to read some old code, i don&#x27;t want to spend ages pulling largefiles that i&#x27;m not going to look at. You can do this with Facebook&#x27;s remotefilelog extension, which lets you make shallow clones, which can omit the large files, but it&#x27;s awkward:<p><a href="https:&#x2F;&#x2F;bitbucket.org&#x2F;facebook&#x2F;hg-experimental&#x2F;src&#x2F;default&#x2F;remotefilelog&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bitbucket.org&#x2F;facebook&#x2F;hg-experimental&#x2F;src&#x2F;default&#x2F;r...</a>
raugustinusover 7 years ago
Would a maven like repository possibly be a solution to this problem? Simply have dependencies to binary files&#x2F;artifacts distributed by Nexus?
z3t4over 7 years ago
File system Snapshots (like in ZFS) would work nice with binary data.