Learning has become a game at one Canadian school where a physics teacher has turned to online role-playing to enthuse pupils.