Civ 4 is almost open source, you know. Much of the game logic is in python scripts, the data is in XML files. They released the source code SDK for the gamecore.dll file, which contains most of the rest of the game logic that is not done in the python scripts. Seems to be working well for them.