Slope Detection

Hey guys, I’ve got a problem and it’s driving me nuts.
Slopes! God how i HATE slopes!
I’m making a game right now, a platformer… ive been doing bits of it on and off whenever I could find the time for ages now… but slope detection is driving me freaking nuts!
It’s easy enough to make him go up a hill using a while loop, but then i have the problem of making him go back down a hill smoothly without it appearing like he is going down a staircase.
Any ideas on how this could be fixed?
I realise I may well have to use an alternative to a While loop… but any suggestions here would be GREATLY appreciated.