New to the forums, or more like new to registering anyway: I'm the long-winded, purple-proseish writer for Amber's Magic Shop who builds houses in Minecraft with his many writer's blocks. But I suppose I'll take a crack at answering this question anyway, even if I am the least suited among the writer staff to do so.
I would say the difference in writing for games versus 'regular' writing depends entirely on the genre and the style of the game in question. Certainly, writing for a visual novel, especially ones with stat-building rpg-ish game mechanics is very different from most regular writing, with perhaps the exception of writing a choose-your-own-adventure story. Even though I (mercifully for myself) don't have to handle the programming aspects or (mercifully for you) the artwork, I've still had to learn a bit of coding as I progress, as well as take player choices into account, which is something I've never had to worry about when writing books. But other kinds of games, like first person shooters or action platformers and the likes tend to be very linear in their story progression, and especially with the former, a lot of storytelling goes on in scripted cutscenes, which makes writing for those kinds of games very similar to writing movie scripts, just making note of when in the game a scene takes place, stage directions for the programmers and model-riggers, and cues for the voice actors. Games like the Elder Scrolls series are probably the most alien, since you have to try to write a story with enough meat in it that the player won't feel like it's just tacked on, but in an open world where the player is very likely to not see the story in the order you intended - for that you'd need to write your story in bite-sized modules that interconnect without one necessarily depending on the other having been seen first, and sparingly funnel the player through choke-points when there's something they HAVE to see before other events. That also has bits of the choose-your-own-adventure kind of writing to it, but obviously can get much more complicated and convoluted.
As for keeping track of the variables, as a personal preference I tend to just memorize the best I can so that as I'm writing a new event I can spot a good point to reference an earlier flag, etcetera, and if I feel like it's been a while or a scene just needs more variance to make it feel organic, I'll go back and see if there's any flags I may have forgotten that I can call to. It may make for a lot of extra coding, but I prefer having lots of flags, so I can have choices effect lots more than just the ending.
Hopefully that answers your question
