there are some good introductory games writing tutorials here http://oos.moxiecode.com/ which should cover what you are trying to do.

Hope this helps.