German does not have fixed positions for subjects and objects. Nevertheless, there are some regularities that can be observed as far as neutral word order is concerned. An overview is given by canoo here.
The word order in your first sentence can be explained by the fact that the subject is a personal pronoun. These often appear immediately to the right of the fronted finite verb, with subjects preceding accusative objects preceding dative objects.
In the second sentence, alle behaves just like a noun and appears to the right of the personal pronoun. Interestingly, the neutral order for nouns (and pronouns that are not personal or reflexive pronouns) is subjects before dative objects before accusative objects.
A more complete exposition is given by the page I linked. Also, don't forget that word orders contradicting these regularities are nearly always possible (given the right circumstances). Your second sentence could be rewritten as Plötzlich guckten alle mich an just fine.