I play occasionally but I've never made a structured effort to improve. How do you get better through the course of playing games?
It's difficult to improve your skill just by playing games. The problem is you have one chance at a shot and that's it. Drills tend to be more effective because you can shoot the same shot over and over again, honing your muscle memory.
In playing games though, you can certainly work on your pattern play and predicting the paths of the balls after contact. What's important is to notice when things go differently than expected, analyze why, and then try to correct for it the next time around. For example, there are certain shots where it is very likely to scratch. If you find yourself doing this often, try to figure out how to avoid the scratch the next time a similar situation arises.
Oh, and the mental game is quite important too. Try to stay focused during the match and only take small breaks between racks. Don't take it easy because you're way ahead or be needlessly reckless because you're way behind in a set.