Download - Game Development Best Practices
![Page 1: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/1.jpg)
Game Development
SCM Best Practices
Sven Erik KnopPerforce Software
![Page 2: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/2.jpg)
2© Perforce Software Inc. All Rights Reserved.
Overview
What makes game development so challenging?
Workflow Git in Game Development
Administration
![Page 3: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/3.jpg)
3© Perforce Software Inc. All Rights Reserved.
• Why is Games Development so hard?• Besides the obvious, I mean…
• Average AAA game:• 100s of 1000s of files
• 1TB+ code and assets at HEAD
• 50GB + changes a day
• 100+ team members
Challenges in Games Development
![Page 4: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/4.jpg)
4© Perforce Software Inc. All Rights Reserved.
Single of Source of Truth
![Page 5: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/5.jpg)
5© Perforce Software Inc. All Rights Reserved.
• Continuous integration• Builds take minutes
(incremental) to hours (full)
• Smoke tests?
• Full tests?
• How do you deal with large teams and many changes?
• How do you deal with large binary files?
Consequences
![Page 6: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/6.jpg)
6© Perforce Software Inc. All Rights Reserved.
• Images?
• 3D models?
• Sound files?
• Locking!
• Across branches?
3-way merge for binary assets?
![Page 7: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/7.jpg)
Codeline Organization
![Page 8: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/8.jpg)
8© Perforce Software Inc. All Rights Reserved.
• Why do we branch?• Different policies
• Decoupling from fast-changing code line
• Isolation of tasks
• Mainline model• All changes flow back to a single
trunk/mainline
• Development branches
• Milestone and release branches
Branching models
![Page 9: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/9.jpg)
9© Perforce Software Inc. All Rights Reserved.
Single Code Line
Head
Stable Head still stable?
![Page 10: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/10.jpg)
10© Perforce Software Inc. All Rights Reserved.
Development branches
Long-lived development branches can cause problems
![Page 11: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/11.jpg)
11© Perforce Software Inc. All Rights Reserved.
Task/Feature branches
Keeping feature branches short-lived avoids severe merge conflicts
![Page 12: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/12.jpg)
12© Perforce Software Inc. All Rights Reserved.
Milestone and release branches
Stabilize in separate branchMerge fixes, ignore hacks
![Page 13: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/13.jpg)
13© Perforce Software Inc. All Rights Reserved.
• Usually do not need all files
• Reduce space
• Speed up workspace syncs
• Perforce Helix methods for filtering:• Manual workspaces views
• Template workspace
• Virtual streams
• Alternative
• Split project into separate code lines
Views for filtering
codeline
ws1
ws2
![Page 14: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/14.jpg)
14© Perforce Software Inc. All Rights Reserved.
Component-based
Shared trunk
Separate trunks
![Page 15: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/15.jpg)
15© Perforce Software Inc. All Rights Reserved.
Helix Streams
![Page 16: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/16.jpg)
16© Perforce Software Inc. All Rights Reserved.
• Git repositories and Perforce Helix (Core) repositories in one place
• Perforce Helix 2017.1 introduces Helix4Git
Can I develop games using Git?
ArtistsDevelopers
Perforce Helix
![Page 17: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/17.jpg)
Administration
• Server sizing and setup
• Archiving and purging
• Replication
![Page 18: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/18.jpg)
18© Perforce Software Inc. All Rights Reserved.
• More RAM is always the right answer (Sven rule #2)
• Keep your database, logs,and journal local• Ideally on SSD
• Depots usually live onseparate storage• Faster Backups
• Shared replica storage
• Be aware of network bottlenecks
Server hardware
![Page 19: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/19.jpg)
19© Perforce Software Inc. All Rights Reserved.
• You can overwhelm storage of any size• Especially with generated files (artefacts)
• Perforce Helix has archiving features• Declare separate archiving depots (type “archive”) on cheap disks
• Use ‘p4 archive’ to move file content (history is preserved)
• Use ‘p4 restore’ to move archived files back in place
• Consider using +S filetype for generated files• Beware of limitations: avoid branching of +S files
Do you need every version of every file?
![Page 20: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/20.jpg)
20© Perforce Software Inc. All Rights Reserved.
Replication
master
failover proxy
forward
edge
Buildedge
shared drive
Main Site
![Page 21: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/21.jpg)
21© Perforce Software Inc. All Rights Reserved.
• Outsourcers typically need a subset of the whole project
• DVCS-style approach:• Use independent Helix server and
push and fetch to transfer changes
• Replica-style approach:• Use edge server, potentially in the
cloud in their region
• Control amount of stored files:
• db.replication=cache
• p4 cachepurge
Outsourcing
![Page 22: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/22.jpg)
22© Perforce Software Inc. All Rights Reserved.
• Perforce Helix is a great choice for your game developers• Artists and developers collaborate
using a Single Source of Truth
• There are many strategies to keep the size in check• Syncing files for users
• Replicas for build systemsand remote sites
• Archiving and purging
Conclusion
![Page 23: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/23.jpg)
Questions? Reach me on Twitter: @p4sven
![Page 24: Game Development Best Practices](https://reader035.vdocuments.site/reader035/viewer/2022062523/5a6497727f8b9a27568b70eb/html5/thumbnails/24.jpg)
Like us on Facebook and LinkedIn, and follow @perforce on Twitter.
Catch up on our latest blog posts.