[fen ""] 1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 f6
How should I play from here? This move seems to head off the main ideas of my kingside attack; what is the best way to proceed with the plan of quickly developing and attacking?
I think f6 is an uninspiring move. It doesn't force anything, blocks the Knight on g8, and exposes the King.
365chess.com says that Black's win percentage is wretched after f6; in fact it's the weakest reply with Black winning only about 16% of the games.
Good continuations include the trade of Knights in the middle with
5. Nxd4 Nxd4 6. Qxd4 or
[fen ""] 1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 f6 5.O-O Nge7 6.Nxd4 Nxd4 7.Qxd4 Nc6 8.Qd1 Ne5 9.Bb3 Bc5 10.Nc3 c6 11.Na4 Be7 12.a3 b5 13.Nc3 a5 14.Qh5+ g6 15.Qh6 Bf8 16.Qe3 Ba6 17.Rd1 Qc7 18.Qf4
...with a pawn-plus advantage to white.
Here's a sample game from 2001, Wolfgang Kuhn is White, Heinrich Lehr is Black. I don't know the strength of these players.
[fen ""] 1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 f6 5. O-O Nge7 6. Nxd4 Ne5 7. Be2 N7g6 8. f4 Nf7 9. Nc3 Bc5 10. Be3 c6 11. Na4 Qe7 12. Nxc5 Qxc5 13. Nf5 Qf8 14. Qd3 d6 15. Nd4 Bd7 16. Rad1 O-O-O 17. Qb3 Qe7 18. Bc4 Rhf8 19. Be6 Rde8 20. f5 Nge5 21. Bxd7+ Nxd7 22. Ne6 c5 23. Nxf8 Nxf8 24. Bf4 Qxe4 25. Qxf7 1-0
f6 is a blunder, hands down. Take the pawn in the middle, keep your light bishop on the diagonal preventing Black from castling, and ride that positional advantage into the home stretch.
Here is what stockfish sees after a few (note that it is important to wait and allow stockfish to get to at least 20 moves of analysis - it can make a difference).
White to move, suggested Qd3 +1.57
[fen ""] 1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Bc4 f6 5. Nxd4 Nge7 6. Nc3 Nxd4 7. Qxd4 Nc6 8. Qd2 Ne5 9. Bb3 c6 10. f4 Ng6
First of all, 4...f6 is not the strongest option for black. The move f7-f6 weakens the light squares around the black king (e6, f7 and g6). Also, it occupies the f6-square where the Ng8 is headed. Having said this, my advice is to grab on d4, castle kingside and attack the black king. White has a solid plus after f7-f6. For instance, how will black castle kingside when the g8-square is guarded by white's Bc4? For example
[FEN ""] 1.e4 e5 2.Nf3 Nc6 3.d4 exd4 4.Bc4 f6 5.Nxd4 Ne5 6.Bxg8 Rxg8 7.O-O
To find out more about black's options, have a look at this sharp line
[FEN ""] 1.e4 e5 2.Nf3 Nc6 3.d4 exd4 4.Bc4 Nf6 5.e5 d5 6.Bb5 Ne4 7.Nxd4 Bc5