Found it, my memory does not server me right.... it is in C...but still the ideas are great.

http://www.fastgraph.com/makegames/sidescroller/

Diana Gruber