Matt Conn didn’t think much of it when he scheduled GaymerX East, a convention celebrating sexuality and gender diversity in gaming, for the weekend after the election. But as the event drew near, he realized that the real world would be inescapable, even in fantasy.

“Depending on how the election went, we knew this would either be a big sigh of relief or a place where people could come together and heal,” said Mr. Conn, the 29-year-old founder of GaymerX, which occupied two floors of the Microsoft Technology Center in Times Square.

The roughly 500 attendees wore badges stating their preferred gender pronouns. Meeting rooms had been converted to arcades, and discussions included “Your Story Doesn’t Need Cis Straight White Dudes” and “Finding & Uprooting Toxic Masculinity and Heteronormativity in Game Design.”

As it happened, toxic masculinity had been having a good week. There was a spike in reported episodes of harassment and vitriol directed at women and minorities in the days after Donald J. Trump was elected. The community that showed up to GaymerX East now felt under imminent threat, not to mention the potential setbacks for gay and transgender rights under the Trump administration.