>>9252849Doc Ock in spidey’s body wasn’t really a “good guy”, per se. He was attempting to be a hero, but he was more brutal than Peter: he maimed and killed several villains.
Ock’s stint as a hero included fighting Spider-Man 2099, and destroying Horizon Labs accidentally.
Towards the end, he has to fight Green Goblin. Eventually, his girlfriend gets kidnapped and he realizes that he can’t beat Gobbie, and Peter is the only person who will ruin his plans. So he uses this brain device thing he had from earlier to restore Peter’s memories and remove himself from Peter’s body. At this time, he learns his lesson and becomes the hero he’d been trying to be for months, as he’s erased.
HOWEVER: while he was fighting spiderman 2099 and trying to save Horizon Labs, months earlier, he was briefly transported through time for a few minutes, until one of the lab employees brought him back. It’s retconned that during those few minutes, he’s pulled into 2099’s universe, where he runs around and discovers that Morlun and his family are killing spider people in every universe, kicking off the Spiderverse event. Peter is also there, considering he’s the current spidey, and they fight once Ock realizes that if he goes back to the past, he’ll eventually lose and give Peter back his body. So, Ock stores a copy of his current memories on his web shooter/octobot.
Ock’s copy stays hidden until the Jackal returns and starts making clones of everyone. Ock discovers a special clone Jackal made, which he alters to contain both his and Peter’s DNA, making him Superior Octopus.
Superior Ock is definitely a villain: he didn’t learn the lesson Ock learned as a hero before he “died”, and this Ock copy joins Hydra temporarily to defeat Spidey. It’s not until Green Goblin becomes Carnage and starts attacking Aunt May that Ock realizes he cares about Peter’s family, given he was Peter for a bit, that he learns his lesson again and tries to be a hero.