This is very video-game centric. I've worked on lots of games in a half dozen studios, and I've noticed that the architecture of game code with respect to sharing between projects is often ad-hoc and unplanned...
(I've asked this question on both gamedev.net and stackoverflow.com, with no responses. I figure there may be other experienced developers here)
I've noticed that in good studios, it tends to approach a pattern like so:
- Product: product specific (ex: MyAwesomeGameApp class)
- Engine: game-type specific (ex: MMOScene class)
- Core: shared by most games (ex: Vector2 class)
- Platform: platform specific (ex: File class)
There is variation of course (usually for worse). For example, Product and Engine mixed up, with a Core that's mixed with Platform-specific code.
Sharing usually happens at the Core and Platform level, with merges being more dicey in Engine, with no Product-level sharing (beyond the first copy and paste). Real sharing is also rare, and takes lots of effort.
I'm wondering if there's a more codified list of best practices out there for organizing and sharing code in studios where there are many games in development. While I understand that you can't share everything, I'm looking for examples of architectures and policies that worked well.