Railroading is when the referee removes player agency. The existence of a setting does not remove player agency. The existence of NPCs does not remove player agency. The existence of monsters or conflicts does not remove player agency. When the referee uses a quantum ogre (i.e. the referee forces the same encounter on the PCs no matter which direction they travel), that's railroading.
There are so many unexpressed premises in here, it's hard to unpack them all!
The most obvious ones pertain to authorship: you assume that players
should have some sort of authority over situation (so "quantum ogres" are bad) but that they should have
no authority over setting. Given the obvious tension between those two premises - how does someone exercise authority over situation if setting is being controlled by someone else? - there must be other premises assumed to, that dissolve the tension: eg that the players can take low-stakes actions, like collecting rumours, that will enable them to learn the content of the setting and hence make choices about which part of the setting to go to and hence which situations to trigger.
Talk about jargon!
Some good examples of very simple node based scenario design might be two introductory scenarios for Call of Cthulhu:
Alone Against the Dark (a solo play, basically a choose your own adventure) and The
Haunting. I certainly wouldn’t describe either of these as a “sandbox” because the action happens at particular nodes. But neither is it necessarily a railroad because the PCs do have options and there are different endings. It’s not the most dynamic and complex structure out there, but it works as an introduction.
One thought, re: geography: One possible advantage for building more complex scenarios in CoC is that the game takes place in a fantastical version of the real world. When a gm creates a setting the players are sort of in the dark about all the details. But if your playing in 1920s Boston, and the the players are at all familiar with that city, they can use that knowledge to go places the keeper did not prepare as a node. Depending on how the keeper handles that (i.e. by not railroading), it can lead to a more dynamic game.
The last few times I've played Cthulhu it has been using Cthulhu Dark rather than CoC. One game we set in between-the-wars Boston, the other in late nineteenth century London.
Cthulhu Dark is not a complete RPG, in that it doesn't fully set out the rules for either framing or for resolution. (The author is aware of this: I'm not criticising him.) I used Apocalypse World-techniques of asking questions and building on answers, and Burning Wheel intent-and-task resolution. There were no "nodes", no "key witnesses", no "necessary clues". It worked fine.
But what would you call a situation where a GM denies player choice within that structure? For example, the players meet someone coded as an antagonist. The GM has prepared this as a combat encounter, but the players decide to negotiate. For me, railroading is useful to describe a gm who just says “roll initiative” rather than improvise an npc response to their negotiations (leading, perhaps, to an unexpected resolution to the scenario for the gm). The fact that this encounter was likely (though, again, not necessarily inevitable) due to the scenario structure is not a railroad in that same sense (choose your own adventure is a good description though).
I bristle at "coded as an antagonist". Unless you just mean that the GM describes them doing something that the players (as their PCs) would rather the NPC not be doing.
If a player says "I say 'Hello'", and the GM responds "roll initiative" then I guess I want to know a few things: is this something that, within the system being used, is a legitimate hard move? For instance, is the attack by the NPC a consequence for a previous failed action?
Or is the player declaring an action - an attempt to talk in a peaceful fashion with the NPC - and the GM is deciding that action fails without calling for a dice roll? In that case, what are the resolution rules for the system? 5e D&D, for instance, says the GM decides if an action has a chance of success or not. Maybe the GM has decided that this NPC is very angry, or is mind-controlled to attack, or whatever. There are other systems, though - eg DitV, BW - that tell the GM to "say 'yes' or roll the dice". In that case, saying "no" would be breaking the rules.
If you are suggesting that a GM who has decided that the NPC is angry, or mind-controlled, or whatever - and hence will attack - should change that decision because the players want a different scene, now we're in the territory of the GM rewriting the setting details based on player desires/suggestions. But above I've quoted
@overgeeked saying that it's not railroading for the GM to author a setting or NPC responses.
So now we have two different uses of railroading - twice the jargon!
Yes, this is where the rubber meets the road. In some approaches, the road already has to be there, and somebody has to lay it down before the car can go along it. A car that laid asphalt ahead of it as it went, or a train that laid tracks, would be quite a marvel. Even somebody riding a horse or trekking on foot is only covering ground that already exists. I'm straining the metaphor, I know. But anyhow, to get to authority, you have one privileged participant who has defined some geography (and more) ahead of time (or maybe on the fly), revealing it to other participants, based on what they ask about.
But we do have the (potential) power to create the very world as we go, in collaboration. The geography (and more) could still be created by one privileged participant, on the fly, or that authority could be shared.
In the Cthulhu Dark episodes I mentioned above, there was no "road" already there. I asked the players what they (as their PCs) were doing, they told me, I (as GM) riffed on that, things happened. In the London game, at various points characters travelled north or south of the Thames. When I asked a player where he (as his PC) was rooming, and he answered "The Forlorn Trap", we had no trouble running with that. When one of the players in the Boston game decided his PC was a longshoreman, I started the action at the harbour. When the other PCs went home, we didn't worry about what suburbs their houses were in. I can't remember if it was me or the player of the journalist PC who suggested his house would have a darkroom for developing photos, but that didn't cause any puzzlement. We just did it.
When, at a certain point, I narrated that the home of the legal secretary was on fire, the player (as PC) made sure she escaped from the flames! There seemed no need to work out how long it might have taken cultists (or a shoggoth, or whatever it was that set the fire) to travel from the harbour to the home and back again.