On the Sega Saturn, there was a game called BUG! You were some non-descript green bug thing that had to go through in-scrolling & sidescrolling levels on a path. It was somewhat '3d' but kind of not. At one point, in one of the levels you have to race Sonic to pass it. If you don't win, you can't progress. His path is longer than yours (see here in the background) on purpose because Bug himself is pretty slow and it needs some mechanic to 'even it out' so it's possible to win. The race is reportedly somewhat difficult anyway.