Ubiquitous computing takes advantage of the great diversity of computing devices available on daily environments to ease the execution of tasks or processes. Ubigames, as the name suggests, employ ubiquitous computing's principles on the design of new kinds of mechanics and interaction models, bringing elements from the real world to interact and blend with the virtual world. Rehabilitation therapy may benefit from this paradigm, since it often requires a long and continuous process in which patient motivation is a crucial factor. Ubiquitous systems, in general, deal with environment adaptability, i.e., the continuous response to the dynamic characteristics of the environment, as well as of the people, devices and applications. Ubigames targeting rehabilitation, for that matter, must also incorporate patient adaptability, which means taking into consideration aspects related to specific health conditions and to individual necessities of each person, with regards to nature of lesion and different capabilities and range of movement. Focusing on these challenges, this research proposed a new solution that extends an existing ubiquitous computing infrastructure and brings a new set of tools to face the specific problems of rehabilitation. The proposal includes a new way of organizing the smartspace, a new set of interfaces and input conversion mechanisms as well as additional tools and support for movement capture devices. The solution was validated via a prototype of the input mechanism of a conceptual game, in which patients must successfully execute physiotherapy exercises in order to control a virtual character, who performs blows with higher or lower strength, according to the success rate of each movement. Measurements were taken of these movements' detection process, with the solution as whole being analysed for its behavior, including with different input devices, and it worked as expected.