game development best practices
TRANSCRIPT
Game Development
SCM Best Practices
Sven Erik KnopPerforce Software
2© Perforce Software Inc. All Rights Reserved.
Overview
What makes game development so challenging?
Workflow Git in Game Development
Administration
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
4© Perforce Software Inc. All Rights Reserved.
Single of Source of Truth
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
6© Perforce Software Inc. All Rights Reserved.
• Images?
• 3D models?
• Sound files?
• Locking!
• Across branches?
3-way merge for binary assets?
Codeline Organization
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
9© Perforce Software Inc. All Rights Reserved.
Single Code Line
Head
Stable Head still stable?
10© Perforce Software Inc. All Rights Reserved.
Development branches
Long-lived development branches can cause problems
11© Perforce Software Inc. All Rights Reserved.
Task/Feature branches
Keeping feature branches short-lived avoids severe merge conflicts
12© Perforce Software Inc. All Rights Reserved.
Milestone and release branches
Stabilize in separate branchMerge fixes, ignore hacks
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
14© Perforce Software Inc. All Rights Reserved.
Component-based
Shared trunk
Separate trunks
15© Perforce Software Inc. All Rights Reserved.
Helix Streams
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
Administration
• Server sizing and setup
• Archiving and purging
• Replication
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
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?
20© Perforce Software Inc. All Rights Reserved.
Replication
master
failover proxy
forward
edge
Buildedge
shared drive
Main Site
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
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
Questions? Reach me on Twitter: @p4sven
Like us on Facebook and LinkedIn, and follow @perforce on Twitter.
Catch up on our latest blog posts.