A basic homemade line marker is a pair of wooden disks bolted two inches apart like the heads of a drum with a strip of screen wire wrapped around the outside. A hole is cut in the side and corked for dumping marble dust or lime into the drum. A hole through the center of the drum lets you run a threaded axle through the drum and the end of a pipe for a handle and bolt it all together so the drum rolls along the ground.
Fill the drum with white marker dust. Sporting good places sell marble dust for this purpose. Lime also works well, but can get on players and irritate skin. Lime is good for the grass, though. In desperate circumstances you can even do emergency line repairs with dry white laundry detergent.
The easiest way to keep your lines straight is to stretch a string between two wooden stakes to use as a guide. Just roll on top of the string and the dust leaves a nice straight line.
Keep the marker machine dry so that the marking dust doesn't cake on the screen when you roll out the lines. Also, avoid using the machine on wet grass. You can clean out clumps with a hose, but allow the drum to dry thoroughly before use.