I'm on vacation, so I'm rewinding some of my favorite editing posts:
Most people seem to know about using commas in a list (the Oxford comma), or including commas before conjunctions (or, but, and, so, if) connecting two independent clauses. But you also need commas when your sentence directly addresses someone or contains an interjection.
"Look out for that giant boulder, Rodger!"
"Rodger, look out for that giant boulder!"
Assuming the speaker took the time to say all this, they are directly addressing the soon-to-be-squished Rodger. A comma is needed before or after his name depending on the location of the name. Also notice that the people or person being addressed don't have to be called by name. A comma is still required even if the object isn't named.
"Everyone, look out for that giant boulder!"
"Look out for the giant boulder, everyone!"
"I love you, my little squishy face."
Butt head, that's my toe you're standing on."
"Rodger never gets squished by boulders at home."
Conversely, here the speaker is only talking about Rodger, not to him, so no commas are needed.
"Geez, Mom, you're embarrassing me."
This sentence has two reasons for commas. First, you have an interjection that requires a comma and second this sentence is addressing someone. When the person being addressed is in the center of a sentence, they are offset by commas.
"Cool beans, Rodger, on becoming the next Flat Stanley."
An interjection is an add-on to the front, middle, or end of a sentence used to exclaim, protest, or command. Depending on how strong the exclaimation, it may or may not be its own sentence.
"Gee, that's swell."
"Hooray! That's swell!"
"Shit, Rodger was squished by a boulder."
"Oh, it got my toe, too!"
"Ow! It got my toe, too!"
"Being flat may be useful, but it's hard to kiss that way, isn't it?"
"Yes, I'm going to Rodger's funeral."
"Rodger should have listened to me, right?"
"Indeed, that was a bad day for Rodger."
"Well, he's at peace now."
Interjections can be a great way to break up your sentence structure and avoid monotony. Addressing characters in your sentences can help avoid confusion when multiple speakers are involved. Just remember the commas!