is trunk-based development easy in game development?
TRANSCRIPT
![Page 1: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/1.jpg)
Is Trunk-based Development Easy in Game Development?
Sven Erik KnopPerforce Software
![Page 2: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/2.jpg)
Challenges in Games Development
• Why is Games Development so hard?– Besides the obvious I mean …
• Average AAA game:– 100 of thousands of files– 1 TB+ source code and assets at HEAD– 50GB + changes a day– 100+ Team size
![Page 3: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/3.jpg)
Consequences
• Continuous integration– Builds take minutes (incremental) to hours (full)– Smoke tests?– Full tests?
• Who broke the build?• HEAD is not stable!
![Page 4: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/4.jpg)
Coding practices compared
• Different ways to organise your sources• There is no single best way– Team size– Target platform: Mobile/Console/PC/4K/…– Rate of change– Iteration frequency
![Page 5: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/5.jpg)
Single Code Line
Head
Stable Head still stable?
![Page 6: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/6.jpg)
Development branches
Long-lived development branches can cause problems
![Page 7: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/7.jpg)
Task/Feature branches
Keeping feature branches short-lived avoids severe merge conflicts
![Page 8: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/8.jpg)
Vignette: mergeable objects
• 3-way merge for text documents
![Page 9: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/9.jpg)
3-way merge for binary assets?
• Images?• 3D models?• Sound files?
• Locking!• Across branches?
![Page 10: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/10.jpg)
Component-basedShared trunk
Separate trunk
![Page 11: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/11.jpg)
Trunk-based Development
Trunk
Release
Extended testing for releaseRequires tooling!
Stable
![Page 12: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/12.jpg)
Milestone branches
Stabilise in separate branchMerge fixes, ignore hacks
![Page 13: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/13.jpg)
Summary
• Stability versus Agility• Trunk-based development can offer both– If supported with the right tools
• Careful with branching of binary assets– Consider componentisation instead
![Page 14: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/14.jpg)
Perforce• Perforce helps delivery teams build complex products collaboratively,
securely and efficiently.• Commonly used for…
– Software– Games– Electronics– Animations– Chipsets – Medical Devices– Internet of Things
![Page 15: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/15.jpg)
Who uses Perforce?
13,000 20,000 users
9,500 users500+ terabytes
5,000+ userscoders & designers
10,000,000 Perforce xact/day
Everything! 11,000+ users
Chips Games & Animation Cloud/SW Electronics Systems Automotive
![Page 16: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/16.jpg)
Perforce Helix
Contributors
Consumers
Flexible Workflows Version control, code reviews, simple file sharing
Fast and ScalableFrom 10 to 10,000+ on a each trunk
Every FileEfficiently handles large, often binary, data
EverywhereSupports geographically distributed teams
Secure Granular permissions, theft risk monitoring
Open and ExtensibleAPIs and integration hooks for customization
![Page 17: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/17.jpg)
StreamsParent-child relationship between streamsDevelopment and release stream typesVirtual streams for easy componentisation
![Page 18: Is Trunk-based Development Easy in Game Development?](https://reader036.vdocuments.us/reader036/viewer/2022062523/58f103991a28ab05158b45bd/html5/thumbnails/18.jpg)
Conclusion
• Trunk-based development is a good thing• Requires the right tools• Recommendation– Componentisation– Protected release streams– Keep everything in one repository