The paper assumes a software engineering view on game-based learning. It outlines our approach of a component-based educational game framework, presents its implementation, and discusses its usage and utility via three experiments. By proposing a component-based framework, i.e. a reusable software architecture skeleton with a growing library of components that can be plugged together and exchanged, we seek to increase reuse in the development of digital educational games. The paper presents our Plug 'n Train framework and its implementation in Java and XML. Inspired by Clancey's (1984) architecture of Intelligent Tutoring Systems (ITSs), Plug 'n Train expects an eLearning system to consist, at least rudimentarily, of four semantic components: User Interface, User, Expert, and Process Steering. A new eLearning system is constructed by plugging these together. We show how this works in our implementation by reporting on a proof-of-concept implementation of the four-component architecture - a simple, yet functional ITS on organic chemistry. The prospect of composing a new eLearning system by exchanging only a subset of components and reusing the rest is particularly interesting for game-based learning. Our hypothesis is that a traditional eLearning application can be transformed into an educational game by exchanging very few modules. In particular, we assumed that we could turn our proof-of-concept ITS into a game by replacing only the user interface. Experiment 1 re-created the Java-based user interface in the game-like virtual world OpenSim and plugged it into the existing architecture. Experiment 2 tried the same with a Tetris- inspired user interface designed in Flash. Both experiments prove the utility of exchangeable modules. Problematic issues are discussed and improvements suggested. For more complex game genres, new architectures have to be composed. Replacing the user interface of a puzzle game is not enough. We are currently applying Plug 'n Train to computer role-playing games (RPGs). Experiment 3 realised an OpenSim-based user interface for a sample educational RPG quest. It contains only little non-user-interface code, concentrated in one in-game object, which can be outsourced to the three further framework components.