What strategies should I be thinking about at the beginning of the game? In the middle and the end of a chess game, there are visible consequences to almost every move you can make, there are more constraints limiting what is logical to move, and it is fairly straightforward to see what you did wrong when you analyze the game.

At the beginning of the game, it seems like there is a tremendous number of possible ways a game could progress--and not very many of the moves have any immediately tangible consequences. Because of this, I usually have no idea what I should do in the beginning of a game.

Are there any things I should be thinking about at the beginning? Up to date, I've just been moving pieces haphazardly until what I need to do becomes obvious.
There are a few regular things you should fight for out of the opening


Control of the center
Development of pieces
Early castle
Space


So basically you want to get as many pieces out as quickly as possible, while attempting to control the center (the four middle squares and to a lesser extent the next ring of 12 squares). While not all opening strategies revolve strictly around these principles, it is found in the majority of games and especially good rules to play by when starting out.

EDIT: Keep in mind these are not all rigid rules. I would also like to respectfully disagree with Tony. When starting out, memorizing openings is the very last thing you want to do. Feel free to look through an openings book (The first, and very amazing, book on openings that I read) or database. However do not seek just to memorize and spit out moves until you reach a position you haven't actually thought about.