Model-Driven Engineering can play a crucial role in developing serious training games. Model-Driven Engineering benefits the creation of serious games by offering a structured software modeling approach, resulting in enhanced productivity, quality, and maintainability of the game software. These models can then be used to automatically generate code and other artifacts, significantly reducing development time and improving efficiency. We propose a metamodel that describes users' cognitive and affective dimensions during a serious game, utilizing a set of classes that define the relationships between them based on a theoretical framework of cognitive functions and emotions. We employed the Eclipse Modeling Framework to transform a primary model of the problem domain into a metamodel. We then combine the cognitive and affective dimensions of the model and formalize it into a generic metamodel for cognitive-affective training of users using serious games. Finally, we illustrate our approach with an example of instantiation of the model metamodel. We concluded with the importance of Model-Driven Engineering in serious game development.