77C is a pretty warm temp for a laptop. Nothing truly alarming, no, but fans going crazy is to be expected at these temps, as laptop fans aren't exactly the most efficient coolers out there.
Maintenance wise, if it lets you open it (I don't know enough on newer macbooks so you'll have to look this up), take out the fan, clean out the grille and the fan, and replace thermal paste. It should help with cooling efficiency. However, from experience on a few years older macbook, high temps and high fan is to be expected when gaming on it.
Also make sure that wherever the flow intake/exhaust is, you keep it uncovered and with plenty of space all around. I know when I would open a game on my macbook, I'd have to actually elevate the macbook a little cause the exhaust around the bottom of the screen, exhausting down and up, just made things way too hot if I didn't.