Firefly Studios released Stronghold 2, a Castle Sim PC game, in April. The promo site includes a Shockwave 3D minigame Castle Attack 2, where you are responsible for defending the castle with your archers, boiling oil, etc from enemy attack as the workers build it. I’m not sure how many levels there are, as I only played until level 4. Does keep high scores.
My personal favorite defense is the rolling fire logs. Watch the little charred enemy people run away from your castle in flames.