When using a person's name, in a dialogue, always use a comma. If the name is in the beginning of the sentence, use the comma right after the name. If the name is at the end of the sentence, use a comma before the name, and if the name is in the middle of the sentence, use the comma in front and after the name.
Example: Alex, do you want to go the store? Do you want to go the store, Alex? Do you want, Alex, to go to the store?
If you don't use the commas, the sentences can mean something else.