In a TED Talk from 2010, Tom Chatfield describes seven aspects that lend to the creation of effective, engaging games. They can particularly be applied to how we learn in general. The video is shown below, and he starts describing the seven aspects around the 8:30 mark.

These ideas apply directly to how learning-oriented games can be designed, and to a large degree apply to the physical classroom environment as well. Chatfield’s list is as follows:
1. Experience bars measuring progress
Instead of assigning grades, some teachers have turned to an experience point system. This is a familiar aspect of games, and measures a student’s steady progression through tasks (or “quests”). This system can apply to traditional classroom learning as well, and a teacher could accomplish this by putting experience bars up on a board, or manage it with online student profiles. Experience points are great at measuring progress over time in a nuanced, quantified manner, perhaps moreso than a flat list of assignments on a student’s progress report can do.
2. Multiple long and short-term aims
Students should be allowed to participate and choose different types of quests. Different quests can lead to larger goals, but students should be allowed to guide their progress, and take ownership of what they choose to accomplish. With enough “subquests,” students feel as though they are continually progressing, and have a clear end in sight.
3. Reward for effort
This goes back to standard behaviorist principles. If desired behavior is rewarded, the behavior will be reinforced and more likely to be repeated. We shouldn’t punish students when they fail, but instead recognize their achievements as they learn. Games teach us that we should turn “failure” into “success not yet realized.”
4. Rapid, frequent, clear feedback
One of the advantages of games is that they allow players to link consequences to actions. Even in cases where a game’s storyline is progressive and linear, a clear cause-and-effect chain is implied. For open-ended games, the player can alter the state of the world through their own choices. It is essential to learning that students are given prompt feedback following activities, so they know if their attempt was successful, or what could have caused unintended outcomes.
5. An element of uncertainty
People should not always expect everything, and the consequences or outcomes should not always be expected. This adds to excitement and encourages people to keep coming back. When applied to education, it keeps students entertained and willing to keep engaging in the learning process.
6. Windows of enhanced attention
Find moments in a learner’s play where they will be most receptive to learning, and identify areas where learners will gain confidence as they play. This can relate to how Kiili (2005) describes flow theory, or the ideal state at which a participant is absorbed in the learning material, the optimal experience in which full attention is placed on the activity, and nothing else seems to matter. If we can create these types of experiences in our games, students will be more receptive to what is being taught.
7. Other people
Students will invariably possess different competency levels in any game they play, and as they learn, their skills will evolve at varying speeds. Hunicke (2005) discusses this at length as a mechanism for creating an effective gaming environment without disrupting player experience. A balance must be formed between the game’s ease and difficulty. In other words, the game must be “gamed” in such a way that learners are not bored or frustrated with the ease or difficulty.
References
Hunicke, R. (2005). The case for dynamic difficulty adjustment in games. Proceedings of the 2005 ACM SIGCHI International Conference on Advances in Computer Entertainment Technology, 429-433.
Kiili, K. (2005). Digital game-based learning: Towards an experiential gaming model. The Internet and Higher Education, 8(1), 13-24.