At a high level, there's no real challenge in creating a plugin. After the header information on the .page, it's all standard javascript / html / css from that point, and the .plg itself handles the install, background scripts started right away etc
But, like @primeval_god says, you reverse engineer something already existing (I'd suggest the dynamix series of plugins to look at first - Mine do things slightly differently).
Any specific questions just ask and someone will hopefully come back with the answer