Developers at Pixelberry didn't know what to do when a player sent a message to the help line for their iOS game High School Story to say that she was contemplating taking her own life.

"We were scared that we were going to say the wrong thing," said Oliver Miao, chief executive and c0-founder of Pixelberry. After calling the National Suicide Helpline for advice, the developers at Pixelberry kept the lines of communication open with the player for a week, telling her to seek professional help but also letting her know that they were listening. At the end of the week, the player said she would get professional help and told developers that the game was the reason she was still alive.

That experience, along with news stories about the suicide of 12-year-old Rebecca Sedwick and others, inspired Miao and the rest of the team at Pixelberry to write a new story arc for their game to tackle one particular cause of teen suicides head-on: cyberbullying.

Miao still remembers getting bullied as a kid -- something he said was an isolating and horrifying experience. But at least his bully couldn't ever follow him home, he said. Now, with bullies pursuing their victims over social media, it can seem almost impossible to escape them.

"At the time I was growing up I didn’t have Facebook or the Internet," Miao said. "It was contained to the classroom where I was being bullied."

High School Story has had 4 million downloads, and gets about half a million players per day. So Miao realized he had a unique platform to reach out to the thousands of teens who tune into his game each day -- 80,000 of whom are likely to contemplate suicide before they leave high school, according to figures from the National Centers for Disease Control.

"That’s a crazy high number," said Miao. And while other factors besides bullying can push teens to think about taking their own life, Miao said that his personal experiences convinced him to highlight the issue bullying. That fit in with Miao's original vision of the game, which he launched with the ultimate goal of using it as an education tool.

"I’m hoping that if we can affect even a fraction of those people, we might help hundreds if not thousands of teens have a better life," he said.

The new story arc deals with plight of a character named Hope, who is being bullied by a girl named Chelsea. It's an in-game journey that the studio hopes will give teens better tools to deal with real-life bullying situations.

The team at Pixelberry worked with the cyberbullying charity Cybersmile to strike the right tone for the arc -- making it educational but not too disturbing for younger players. In fact, Miao said, the bullying experts they contacted told the developers that they could "push things more in terms making them really real about the problems that teens had" in order to add authenticity. "And as we wrote it, we did make it darker than we’d anticipated."

So while the game doesn't explicitly say that Hope is contemplating suicide, Miao said, the writers put in allusions to the fact that she may be planning something more drastic. Writers were also careful to show how cyberbullying can look from the other side and how quickly it can get out of hand. In the game, the original bully, Chelsea,  finds that the lies she spreads about Hope have spiraled out of her control.

Pixelberry is also raising money for Cybersmile through in-app purchases. Miao said the goal is to raise at least $100,000 for the group.

Miao said he hopes that frank treatment of cyberbullying will help the game ring true with the teens who play it. So far, he said, the reaction has been very positive. In reviews left with developers from the estimated 400,000 players going through the arc as well as through in-game messages, the developers have heard from many teens who said the message really resonated with them.

"What I love about this is that high-schoolers are coming to our game to be entertained, and then they learn something," he said. "This is where they already are, and we can use it to educate and better their lives."