Most games are written with custom code based on the C programming language. A 3-D code engine is almost always used to generate the incredibly complex code necessary for all of the polygons, shadows and textures the user sees on the screen. Another important aspect of the code is the artificial intelligence component.