And how much of that is usually reflected in you D&D or other RPG games? Do the PCs ever come in contact with the laws or are restricted by them?
Also, what about the details? Knights in shining armor? Probably. What about firearms and cannons? What about ships (do they have cannons?)
I'm really into the trappings of authenticity to dress my fantasy settings as a great immersion tool, even adding innocuous detail of some authentic subject that the players might be unfamiliar adding both educating properties and something else to pull you deeper into the setting environment. In my continued development of the
Rite Publishing Kaidan setting of Japanese horror (PFRPG) (my published homebrew) I try very much to include extensive feudal Japanese culture, government, caste system politics, rice based economy, police state quality of the shogunate though metsuki inquisitor/spies, imperial control on magic use with the Ministry of Onmyodo, yakuza controlled urban districts, etc.
If I were to homebrew a more typical western feudal setting, I'd put in the same effort and detail of authenticity to accomplish it, at least within my standards (its hard to meet my satisfaction, even things I do myself).
I am certain that most published settings/adventures hand-wave much of this historical authenticity, since the setting is intended to be fiction. That's a choice of the developer/publisher. Perhaps their story and concept is more important, and the feudal dress is just stage props, so have no real need for authenticity. I cannot really say, simply guess.
The original Harn setting relied on more authentic feudal details, and probably was a great influence in how I like to present any settings I build.
Regarding knights and since I primarily use Pathfinder, I'd go with cavaliers and cavalier orders, then include extra details specific to the knight's order for story. I'd develope a network of political allies and opponents, among members of the order, between the order and their liege lords, include all the feudal trappings that make it work.
Referring again to my Kaidan setting, there's a product called
Way of the Samurai, not only is there plenty of fluff/background information on the samurai caste, all its members beyond just samurai warriors, politics, views on religion, code of Bushido, when seppuku can be avoided honorably, honor itself, and Spock's "needs of the many outweigh the needs of the few (or the self)" mentality that all Kaidanese (Japanese share). Beyond the bulk of the PF specific crunch, there's a section at the end called Creating a Samurai Clan, where I convert the GMG city stat-block rules to create unique individual and highly detailed rules for a samurai clan, including sources of income, ruler owing fealty, clan lord, clan lieutenant, etc. I even included 36 samurai kammon or house crests to choose from to depict your custom samurai clan (yes, I get really detailed in my concepts.)
If I were creating an Knight's Order, I'd adapt these rules to apply to a more western theme, though it would be an easy conversion, I think.
While I prefer pre-gun powder settings, personally, I've included gunslingers in Kaidan. I haven't used much cannons, firearms, gun powder in my personal games. I did pick up
Razor Coast's Fire as She Bears rules on ships, and do plan to run a ship to ship, ship to shore battle using ships of sail and cannon someday soon, as I am intrigued, though as stated its not something I normally prefer. The rules in that guide seem pretty good compared to others I've read, and I think there's a lot of authenticity in the way that supplement's mechanics meeting its fluff in a believable and immersive way. I will use guns sometime soon (and I'm fine with how PF guns mechanics works for the most part - I've seen many previous versions that I didn't care for).