Yeah, but his own game hasn't been adapted in the movie.

Jim Carrey actually loves playing as Robotnik since he's a mad scientist.
He has said before that actors must find themselves in every character they play and it worked when playing as Robotnik.
During playing Sonic 1, he even insisted that in the sequel Robotnik should have a mustache just like in the game.
He said, "That mustache was the beginning of, you know, the first manifestation of evil."
He also loves people who worked in Sonic movies and loves working in Sonic movies.
As opposed with ... in How the Grinch Stole Christmas (2000) when he's reported being upset many times to the crews or in Eternal Sunshine of the Spotless Mind (2004) where Carrey suddenly felt insecure and that the production tried to destabilize him on set or in Kick-Ass 2 (2013) where he then said he could not support the level of violence in the film and that recent events had caused a change in his heart.
In summary, I would say he wouldn't mind having Sonic 3 as his top grossing movie especially since he really went all out by playing two characters at once.

It's super-rare to see him want to reprise any of his roles. Even he was getting tired of Ace Ventura by Nature Calls.
I think he finally make a peace with himself in the movie when he's saying "good bye doctor" so he might switch to the good side since Robotnik's also died heroically saving the world.
I know he hates Sonic and Knuckles, but most likely he's still okay with Tails and Shadow.
He could be Shadow's partner instead of Randall

I haven't thought of that.
My "idea" would be he creates Metal Sonic as a means of revenge against Sonic for the death of Dr. Robotnik. But Metal Sonic quickly goes SkyNet against him and eventually becomes Neo Metal Sonic who sends an army of Metal Sonic's back in time to kidnap Sonic. Amy is one of the survivors who go back in time to save Sonic.[/quote]