Serious games and especially their employment in healthcare applications are an active and rapidly growing area of research. Video games are expected to increase patient participation through motivational environments and to provide feedback, when repetitive rehabilitation exercises can be incorporated into game interactions. However, wide-spread use is hindered by several challenges regarding the availability and costs of input technologies, the workflow in an every-day clinical environment, the effort of application development and proof of efficacy. This thesis contributes to a solution to these problems in multiple dimensions. An affordable flexible full body Motion Capture (MoCap) system has been developed, providing methods to generate a customized skeleton model for a user and fit it to optical tracking data in real-time. The MoCap data can be used as input to a serious game and to guide the patient in his relearning process (e.g. correcting errors in movement patterns), which is done by a therapist during conventional occupational or physical therapy. Furthermore, the algorithms were integrated in a workflow, which can be handled in an every-day clinical environment. In addition, a low-cost MoCap system has been developed based on RGB-D sensors and evaluated as an alternative input modality for a home-based or telerehabilitation scenario. However, muscle activity not always results in visible motions and might be difficult to track using conventional MoCap devices and therefore biosignal acquisition systems are also used for input. Developing applications and serious games for rehabilitation, especially with a Virtual Reality (VR) setup, requires a lot of time and effort, because in addition to the implementation of game logic and content, often input/output devices, such as the above, have to be integrated and their data processed. Therefore, for serious games in rehabilitation and other VR applications in research and teaching we have developed a powerful framework - ARTiFICe -, that is lightweight and flexible and easily integrates new devices and technologies. Furthermore, it incorporates modules for interaction, distribution in multi-user scenarios and haptic feedback. Finally, a serious game has been designed and implemented based on the ARTiFICe framework targeting rehabilitation of patients with musculoskeletal chronic pain of the lower back and neck, a group that has previously been neglected by serious games. The game was evaluated in a user study with a sample of ten adults with musculoskeletal pain and showed potential efficacy, clearly motivating patients to perform their exercises.