1. A method of generating optimized code for rendering an art asset at runtime in a computer, comprising: providing an art asset and one or more render methods associated with the art asset to a front end of a compiler; generating one or more packets in the front end of the compiler, each packet representing a fragment of the art asset and an individual call to one of the one or more render methods; and generating optimized code and data streams in a back end of the compiler using the one or more packets, wherein the optimized code and data streams are used to render the art asset on a display at runtime.