Instructions
Download and compile the source code for a city simulation game such as OpenCity or Unknown Horizons.
Play the city sim game, and list on paper the components (e.g. building, roads) it allows players to build cities with.
Write a list of component objects (e.g. tires, engines) that a player can assemble a car from.
Write notes on how the city sim game allows players to fit the components they've chosen to the "chassis" of the city. For example, write answers to questions like, "Where can does the game allow me to place buildings, public works like utility lines, and landscape elements (e.g. trees, terrain), and other structures?" An answer you might write could include, "The city sim game allows players to build parks by dragging and dropping different species of trees (e.g. oak, maple, willow, pine) into a rectangular patch of terrain."
Rewrite the questions you asked in the previous step to relate to your car customization game. For example, "Where on the car's chassis does the game allow players to place the tires, engines and other car parts? How exactly does the player place these parts?" An answer you might write could include the following: "The player can click on different tires from a gallery of tire images, then drag them onto the car's wheel axles."
Once you have detailed descriptions relating the different components of the car and how they fit to the chassis, you can begin learning the source code for the original game.
Print out the game's source code, then retype, compile, and play the game. This process makes you read the source code carefully, which is a first step in understanding the code.
Delete one of the source code files, then try to retype it from memory. Read the printout for the source file only as needed.
Recompile the game, then repeat the previous step until you no longer need to read the printout.
Delete and learn each remaining source file in the same way as the first. Completing this step will give you an understanding of how the original works sufficient to begin changing the game.
Type source code that replaces the city sim's database of parts with the car parts from Step 3.
Write source that replaces the rules determining how players fit the city parts together, with the rules your wrote in Step 5.
Compile and play the game.