The best way is to download source code and have a look at it. You can get the code for Voodoo Girl: Queen of the Darned from
www.voodoogirl.cjb.net. This includes the actual game, graphics, sound, etc.
I'm sure there are other examples out there, as well. Everyone who posts on this board is intelligent and helpful. Ask for code to look at, or where to find tutorial *code*, and you will probably receive.
BTW, if you have any difficulty deciphering my code (it's not the most well-written, although some of it is clever

), you can message me through this site or my website or e-mail (failrate <at> hotmail <dot> com)