Darkest Days:

Fight for human kind against an unstoppable horde of machines! 

An advanced AI created by scientists went terribly wrong when it started creating an army of drones to fight against us... Now it has taken over the galaxy and the last remaining planet under our control is being attacked. Earth is about to be destroyed!