Digital games can be regarded as a possible vehicle for changing the students' behaviors. However, not all digital games could produce these possibilities. In order to address this issue, we proposed a preparation-before-competition approach and adopted it to design a game-based learning environment, entitled My-Pet-Trainer, to foster the habit of endeavor. That is, students make more effort to learn; they will win more easily. The system encourages students to improve their learning in the preparation phase where the virtual pets represent students' profiles before the competition phase. My-Pet-Trainer was used in an elementary after-school club and students' home; we evaluated it by the field observation and the interview of individual student. The findings showed that rich phenomenon about the effect of My-Pet-Trainer. During each observation and interview, we re-adjusted continuously My-Pet-Trainer according to students' feedbacks and behaviors.