Summer Wars

Summer Wars (サマーウォーズ, Samā Wōzu) is a 2009 Japanese animated film directed by Mamoru Hosoda, animated by Madhouse and distributed by Warner Bros. Pictures. A manga adaptation of the film was written by Iqura Sugimoto and began its serialization in July 2009.

Plot
Kenji is your typical teenage misfit. He's good at math, but bad with girls, and spends most of his time hanging out in an all-powerful online community known as Oz as a moderator with his best friend Takashi Sakuma. His virtual life is the only life he has until the girl of his dreams, Natsuki steals him away for the starring role as her fake fiancé at her family reunion. Things only get stranger from there. A late-night email containing a cryptic mathematic riddle is sent to Kenji, and Kenji having nothing better to do, decrypts it. He sends a reply with the answer and the next day hears that he has decrypted Oz's renowned encryption key. By doing so, it unleashes an AI intent on using the online world of Oz to destroy the real world. As the armagedon looms on the horizon, Kenji and his new family set aside their differences and band together to save the world they inhabit and hold so dear by defeating the AI nicknamed Love Machine.