OK, just a couple more reports from the Tucson Festival of Books! This panel was on The Physics of Magic, with Dennis McKiernan and Timothy Zahn. Again, this is posted for the ideas these men convey, and isn't necessarily an endorsement of them. A few notes from me in (())s.
Dennis McKiernan says, "In physics, there's no such thing as a free lunch." He says it's not like in Harry Potter, where all you need to know is Latin. There, you don't pay anything to cast a spell..."You need a stick."
Timothy Zahn says the cost can be emotional/physical, or energy like real physics, or even moral costs like Lord of the Rings (Sauron was cast out because of the rule that wizards cannot dominate the world). He also says that in the real world, any equipment must work in a specified way. You must "put a box" around your magic so you know what you can do, and so your reader knows what you can do. Think of "costs and limitations." ((My dad in particular hates when people can do ANYTHING with magic--that turned him off of Lost, and he does mention it as a problem with Harry Potter.))
Dennis later says, "Never pull anything out of your hip pocket that the reader is not prepared for." This means a lot of foreshadowing. He also says, "Never make it easy on your hero."
Timothy also notes that the moral element can add another "box" for the hero--that they have to win against bad guys in a specified way. ((That would be a bit like the real world, where suicide bombers can kill and destroy indiscriminately but the good guys are hopefully derided for doing so.)) But the Nazis are a real-world example of how following the moral code can be advantageous--refugees from occupied countries helped develop the nuclear bomb. ((Or as my dad simplifies, "Our Germans were smarter than their Germans."))
Timothy thinks that you should set things up so that the reader remembers the setup later. The reader should understand it no more than two paragraphs before it's revealed. He also notes that in the real world, with weapons technology, someone is always looking for a counter. When he asked a 4th grade class about limits to magic, a child suggested "When you cast a spell, a dog appears and tries to bite you." ((We all laughed at that!)) He said if magic has been going around for 10 or 15 years, people have figured out all the ways to use/abuse it, and how to counter it.
Dennis notes that magic should be fairly rare or it gets too mundane, common, and boring.
But Timothy countered that Harry Potter has a lot of one-of-a-kind devices. In the real world, the knowledge that it has been done is enough to make more people make them. So if you have one-of-a-kind devices in your world, you have to figure out why someone hasn't made it yet. (Some options include guarded secrets--no one knows it exists--or that it's very hard to make.)
Dennis says that even in fantasy worlds, trees and rivers must act like trees and rivers. The fastest river, he says, is 30-40 miles per hour, with most running at 2 or 3 miles per hour. Things with some real-world basis should work like they really work. He notes that in most fantasy worlds--including his own, he admits--thousands of years pass without technological advances.
Timothy notes that for hundreds of thousands of years, things overall didn't change much. War speeds development. If the land is peaceful, things may not progress much, especially if wizards don't want peasants to get these developments.
One fascinating tip that Dennis had was that he is careful to place "red slippers" in his work. The idea is, what if a Sherlock Holmes mystery started out saying "We had just solved the case of the Red Slipper when..." someone came in and another random adventure started. They'd never actually describe the case of the Red Slipper, but someday, the author might come back to it for a new adventure. Those are the kind of hints you can scatter throughout your work--leaving a ton of things you can come back to when you write more stories.
If the archive link still works, you can read about red slippers in more detail at http://www.oocities.org/mithgarpedia/rs.html