One recommendation I’d offer for anyone learning how to write good dialogue:

Eavesdrop.

You might feel kind of creepy doing it, but seriously; if you want to learn how to write dialogue that sounds like real people talking, listen to real people talking. People rarely talk the way you think they do in your head.

How? Get a notebook, laptop, or tablet to write with, and go to Starbucks, or the mall food court, or some other place where people like to hang out and talk. Find someone interesting looking, and write down everything they say. I like to write a small description of them, and give them a dummy name.

Example:

Jack, a mid thirties male; wearing a tie and collared shirt with khaki pants. White; neatly combed brown hair, brown eyes.
Rita, a twenty-something female; wearing a bright green blouse and ankle length khaki skirt. White; red curly hair, green eyes.
Jack and Rita seem to be coworkers.Jack: Have you called your contacts yet about the new product?Rita: I started to, but got tied down doing busy work for the Dragon Lady.
Jack grimaces.Jack: You’d think we get paid to be personal assistants.
Rita laughs.

Again, this is just one way to get better at writing dialogue. If you spend time practicing this, the end result is normally a pretty good reference file you can use to learn speech patterns. This is especially useful for dialects. If you can swing it, listening to people who talk like how you envision your characters talking is a good choice. That can be a challenge; finding good examples of a Northern British accent in the Deep South, USA, won’t be easy. If you need a more exotic accent, one way to do it is to try looking for YouTubers who may speak with that accent, and try the exercise on their videos.

“How? Get a notebook, laptop, or tablet to write with, and go to Starbucks, or the mall food court, or some other place where people like to hang out and talk. Find someone interesting looking, and write down everything they say. I like to write a small description of them, and give them a dummy name.”

…and get arrested? Seriously, this idea sounds very risky! It only takes one person to sneak up behind you and say, “OMG, He’s writing down everything you say!”
Woman: “Ew! WTF, Creep! You’d better delete that file at once, or I’m calling the cops!”
(Someone has already called the cops at this point.)
You try to defend yourself, “I’m just trying to–!”
Woman: “I don’t care!! Delete it or I will!!”

It’s similar to taking a person’s picture without permission.
But, This is more of a USA woman’s reaction though and towards a man. In better countries, like New Zealand, Australia, Norway, Finland, The Netherlands, Switzerland, etc, the citizens are much friendlier.

You actually can’t really get arrested for transcribing a public conversation, but it’s better to say, do it in shorthand or something less obvious to the naked eye.

I’ve used people-watching for both playwriting and screenwriting. You don’t really even need to transcribe so much as just pay attention to the way people speak, their body language, how their speech might change depending on who they’re with.

There are people like Andrea Mears in the world, who freak out if they think you’re spying on them. That’s what I was saying. In the USA, you can be arrested for anything, whether you’ll be formally charged is another matter.

A thing to keep in mind with getting “realistic dialogue” is a step or two before you start ironing out the dialogue itself: do you know who and what these characters are?

So, have you plotted them out to give yourself enough background material to draw from and understand their motivations?

It’s not necessary to always get their whole history down, but it certainly can help; and additionally, it’s not as though you’re going to share what you write down with everyone with how you planned the character! Just enough for what their dialogue needs at each time and enough with how they contribute to the script/plot of the game as it happens.

As for people watching, it’s an art! I’d follow Jennifer’s advice though with people watching/listening: don’t do word for word. You’ll need to construct your own characters and 100% composites of conversations you heard tend to look really odd.

Honestly, I’ve never even been noticed doing this before, lol. I just go to Starbucks, get my coffee, sit down, start writing, and leave when I’m done. I don’t think anyone’s ever noticed what I was doing, and if they did, they never mentioned it or reacted to it.