THE TROUBLE with children is that they often mess everything up. There you are with your exquisite garden full of rare and distinguished plants. And here come the children with their swings, slides, jungle gyms and a great many other such devices, most of which look like a corss between a plumber's shop and a bicycle repair shop.

Inside the house, it's worse. Here you've spent all those years buying those expensive Barcelona chairs, and arranging them at precise angles in each other. And the children come along to stick peanut butter into all the button tufts. You can't just stuff the children down in the basement with their fingerpaints and their toy trucks. They pop back up on the main floor like a jack/jill in the box. They want to be near the parents, or more precisely, the refrigerator.

Making children's play fit into interior and exterior design takes much architecture and sometimes cabinet-work. William P. Lecky is an architect as well as the father of Brooke, 6, and Eric, 2 1/2. Lecky's most recent project for his young clients is a colorful playcastle made of the beams and boards left over from an earlier project, a playroom that also serves as a family less than $25 in materials, considerably more in design time plus two weekends of hard labor.

All the 2-by-8s and 2-by-10s came from the roof of the old garage, which became the playroom. The slide was bought cheap because one end was damaged, unimportant since it's built in. The only other materials he had to buy were plywood and hardware.

The playcastle has two stories, a wooden dowel climbing ladder, three circles to crawl through, the slide and even a flagpole with a plastic placemat for a flag. The principal pieces are bolted together for sturdy, no-rock safety. The cutout plywood sections are painted cheerful colors. In all, the playcastle is about 4-by-8-feet wide by 7 feet high.

Geraldand Linda Stern of Cleveland Park have an Eric and a play gym, too. Eric is 7 and his brother Jesse is 2. Their gymcastle is about twice the size of the Leckys'. It was designed and built by Jeffery Wilkes and Lloyd Greenburg, who are far into cabinet-making and carpentering. The structure ws so elaborately built it took four weeks to assemble. The boys' parents hate to think about the actual cost of the project. Wilkes and Greenburg say something similar would cost "more than $1,000 - much more."

Though that amount of money sounds frightening, similar prefabricated play structures sold by companies for schools cost $4,000 to $5,000. Wilkes and Greenburg say, "The structure really should be considered as much a garden sculpture as a play-thing. We tried towork it into the site, first, so it wouldn't be obrusive in the garden. That's why we nestled it into the trees.

"It took a great deal of measuring to make it just fit. We had to calculate, for instance, just how far the swing would go before it would hit the fence behind." Each piece of wood was coated with a preservative before it was assembled. The builders but most of the hym together with bolts instead of nails, for strength.

The swing is made of rubberized canvas and rubber straps. A knotted climber rope swings in the circle cutout. The blackboard also serves to snake a deck divider on the top deck.Two decks, galvanized steel climbing bars and a slide complete the 10-by-14-by-11-foot-high structure. Shredded the palygym. The cost of the Stern structure is also attributable to the high cost of the materials, principally new redwood and cypress.

Lecky has made many handsome toys for his children: a wooden jigsaw puzzle in the shape of a fish, a play cart with huge wooden sheels and plastic bowls set into the top to hold small parts for projects, among others. Two years ago Lecky and made so many toys you couldn't walk through the kitchen and the living room without tripping. Something had to be done!

About a year after Brooke Lecky was born, her parents had bought a pleasant 1950s modern house in Holmes Run Acres in Falls Chuch (designed by Nicholas Satterlee and Francis Donald Lethbridge). The development is notable because - at last count - 80 architects live there, attracted by the flexible design and the good siting of the house.

So when they needed more room, Lecky decided upon a standard Holmes Run ploy - remodeling the garage. He first planned to do it really on the cheap, keeping the existing roof. But the day Joe Krewatch of Little-page Construction Co. came to start work, Lecky said, "Joe, that flat roof is just wrong, and I'll never be happy with it. What would it cost extra to put on sloping roof?"

Well, Krewatch said, without too much figuring, the new roof would only add $1,100 to the price. Lecky, who had figured it at twice that, almost fell over himself telling Krewatch to go ahead. The completed playroom job came to $8,000 - a bargain in this day and time for a 20-foot-by-12-foot room with a ceiling which slopes from 7 1/2 to 10 1/2 feet.

Lecky had advantages. The footings for the garage's two low brick walls, supporting the posts, were sufficient, he thought, to support the added weight of the new full-height brick walls. On the southweat wall, he designed a series of piers with glass going down quite deep to a counter which also serves as a window seat, plant tray and, underneath, a toy garage. The ceiling is wood with exposed beams. The workmen poured a new concrete floor atop the old one to level it.

The link between the new room and the house washandled neatly with a sort of stage with steps coming down. Brooke and friends give performances here, with the help of a jumping rope as a microphone. A circular window in the wall and the old front door lets through heat and cool air from the house's central air conditioning.

Outside, on the front, Lecky added a deck with generous steps, a bench for plants or visitors and a cantilevered flower support. There's even room underneath for the garbage cans. Railroad tie steps go down into the front garden. Hanging plants are grace notes.

Downstairs, a ground-level room has become the library, craftsroom and artist's studio. Lecky covered one wall with composition wallboard, about the cheapest surfacing material going - idea for Brooke's prolific art work and Lecky's photographs of the children. The His and desks are squares with circles cut out and a bookcase extends along the whole wall. Where once there was a closet there are now shelves with baskets and boxes and narrow drawers for stamps and other collections. On another wall are legnths of plastic sewer pipe mounted to hold wrapping paper and other rolls. On another wall is the elaborate graphic "Enjoy."

The Leckys have promised themselves, when Brooke and Eric are a bit bigger, the children will take over the whole bottom floor as their domain, and the upstairs playroom will then become the elder Lecky's studio/study.

Child's play can be architecture, but it can also be a lot of work.