Traditionally, there have been two large obstacles faced in attempting to apply AI techniques to games and other virtual environments. The first obstacle is the gap between the largely declarative representations used by many AI techniques and the largely procedural approaches used in virtual environments. The second obstacle is the gap between the skill sets and knowledge bases of the two domain experts with AI researchers often lacking experience using virtual environment APIs and development environments and virtual environments developers often lacking significant AI knowledge. In this paper we present Bowyer, a tool designed to address these two obstacles to the integration of AI planning algorithms into virtual environments. Bowyer bridges the gap between the declarative representations in a planning domain and the procedural framework of a virtual environment via the use of code generation techniques. Bowyer’s functionality also allows planning researchers to integrate their planning research into virtual environments without the need to have extensive knowledge of virtual environment development.