A good educational game leverages entertainment into a positive learning outcome for the player involved.
I recently spent 30 minutes playing SQL Island, an online game that takes the player through a linear story. The story unfolds by solving problems (SQL is a language used to interact with databases) using SQL syntax.
The game itself isn’t revolutionary. But the experience is excellent because learning and gameplay is so well integrated. For instance, you learn how to use SELECT in your SQL statements to get information by facing scenarios in SQL Island where you need information, and SELECT is the only way to get it.
Even if you aren’t motivated to learn SQL at all, the game is still probably fun enough to hold your interest. And if you finish, you will know and understand the very basics of SQL.
That’s what good educational games do.