For many parents in the quiet beach suburb of Marshfield, a stitch has been added to the moral fabric of their community. This week the state Supreme Judicial Court upheld a ban on coin-operated video games. It is believed to be the first outright ban on computer games to hold up under judicial scrutiny.

''This is a progressive step in that it protects life in a small town from an urban-type hony-tonk environment . . . the fewer distractions of that type, the easier it is to transfer my ideas and values to my youngster,'' summarizes Jim Judge, a father of three girls and one of the initiators of the ban.

Marshfield, like other communities around the country, has wrestled with ways to control what some see as the ''nuisances'' associated with commercial video game use. But while most other communities have opted to regulate use and location of the games, Marshfield chose to bar them completely. About 200 citizens attended a town meeting last year and passed the ban as the easiest solution to anticipated problems from the town's 60 or 70 games.

Similar bans have been proposed in other communities around the nation, says Edward Zeigler, a law professor at the University of Dayton and an authority on video game regulation. But this week's court ruling ''is significant because it's the first state court decision to uphold [such a law],'' he said in a telephone interview after the decision.

''If we have these things in the town, it draws the wrong type of people and we want to protect our town,'' says Betsy Judge, who admits that she's never actually seen problems, such as loitering, in her town or any other she's visited. She adds that her beliefs stem from the idea that ''hanging out'' is not a constructive activity for youths.

The games are said to be addictive to youth, who will skip school and spend unreasonable sums of money to play them at a quarter -- and sometimes 50 cents -- a pop, says Thomas R. Jackson, a retired narcotics agent and the resident who proposed the ban. Further, he says, gambling and drug activity are connected to the video game locations where youth congregate unsupervised.

''If a town can kick out an entertainment medium, it isn't long before other mediums [are attacked], too,'' says Ira Zaleznik, who says he may appeal the ruling to the United States Supreme Court, and proponents of the ban suggest that this week's ruling will affect the approach other towns take in grappling with ways to control video-game-related problems.

The Massachusetts ruling is not binding elsewhere, but it can be used to bolster other cases. In this case, the court found that the video games were not entitled to the constitutional protections for free expression and communication. In challenges to game restriction, the video-game industry argues , as a rule, that the games should come under such First Amendment protections. They argue that the games are forms of communications, like movies, even if their sole purpose is amusement, says Mr. Zeigler.

Zeigler notes that in New Jersey a similar ban was struck down by a state court on the basis that communities have to accommodate recreational activity, and that there was no basis to outlaw the games entirely.

''Other courts may or may not follow the [Massachusetts] ruling,'' he says. ''But it looks like in the future it's unlikely the court will uphold bans in large urban areas . . . It's posible, though, in a residential community [where the activity could alter the atmosphere].'' Local leaders often are allowed to regulate development by banning movie theaters, drive-ins, and the like, says Zeigler.

Some approaches to game regulation include zoning or licensing. For example, in San Gabriel, Calif., according to Planning magazine, the zoning ordinance includes standards for location, noise, parking layout, signs, and player supervision. Licensing is a more temporary regulation, which allows reconsideration of permission to operate. It also provides revenue with which to administer the regulation of the video game business.

Mrs. Judge, however, says she doesn't think regulation works. She uses movie ratings as a parallel. ''Did you ever go to an R-rated movie? Look around and see how many 10-year-olds are there on a Saturday afternoon. Let's not have it [ regulation], if we can't enforce it.''