HAven't played castle crashers, but I was watching one of the art videos by Synj posted on the dev blog and noticed a boundary layer flashed a couple times. I think they defined the level with a bunch of line segments. Not sure of how they would code that though. Probably a formula out there to tell if a point is on the left side or right side of a line segment.
Here's the video I was talking about. There are these red lines that flash on screen around the 1:50 mark which look a lot like collision boundary information
http://devblog.thebehemoth.com/?p=105
Here's an idea for doing inclines. Use a list of x,y points descirbing the maximum height points at various parts of your level. Say you wanted a level 400 px long with a small 50 px tall, 50 px long pyramid in the center. Your list would have 5 entries like so: [0,0] [175,0][200,50][225,0][400,0] What you would do is loop through this list to find the two points the player's x position is between. Then you find the slope for the line segment those points form and plug it into a simple y=mx+b formula to find out what the y position should be.