Educational computer games have been recognized as being a promising approach for motivating students to learn. Nevertheless, previous studies have shown that without proper learning strategies or supportive models, the learning achievement of students might not be as good as expected. In this study, a knowledge engineering approach is proposed for developing educational computer games to help students learn about the knowledge for differentiating a set of learning targets in an interesting and meaningful way. Based on the proposed approach, an educational computer game has been developed for an elementary school natural science course. The experimental results show that the proposed approach significantly improved the students' learning achievement as well as their learning attitude and motivation.