When using caffeine, your target dose is 100mg. This may vary based on body size and tolerance, but 100mg is an average effective dose. You get this from one cup of coffee (mug-sized), one espresso, three cans of cola, two cans of Mountain Dew, or ten candy bars. It should take effect in about 15 minutes and ward off sleepiness for about 4 hours.
If you can, save caffeine use for when you need it. Complete tolerance develops somewhere in the neighborhood of 1g per day. At that point, you need the caffeine to function properly, and you will go into withdrawal without it. Mild overdose begins around 300mg (remember that it wears off and no longer “counts” after four hours), and 10g is the average amount to kill a human. That is about five liters of espresso, so you are unlikely to reach 10g without pills.
If you are staying up late playing, make sure that you are not too drowsy to tank. Caffeine does not counteract the effects of alcohol. An awake drunk is still drunk, and if you are too drunk to drive, you are too drunk to heal me.