Magic is Programming

Chapter 4: Magic



Chapter 4: Magic

Carlos tried to assess the girl he'd been directed to as he approached her. She had short hair of a light brown or perhaps very dark blond color, and a thin build with almost spindly arms. She was wearing mid-thigh length shorts and a slightly baggy shirt, and she was slouching forward over her book, paying as little attention as possible to her meal while still periodically taking bites of stew, careful to avoid spilling any on the book. She did not react at all even when he arrived standing right beside her.

"Uh, excuse me, miss?"

The girl ate another spoonful of stew and quickly returned to reading.

"Ahem." Still no reaction. Carlos gently tapped her on the shoulder. Instantly, she jerked, accidentally tossed her next spoonful of stew down the table, sat bolt upright, and twisted around, looking in every direction before finally focusing on Carlos.

"Ack! Wha- Oh! Sorry, sorry, I was distracted. Um. Why are you here? I'm not bothering you, am I? I can go." She picked up her bowl of stew and book and started standing up before Carlos could even respond.

"You're not bothering me. Calm down, please stay." Carlos held up his hands and gestured back at her seat, then pointed at the cook. "He said you might help me if I join your party?"

"Oh!" She stared at him with wide eyes and a poleaxed expression on her face for a moment. "Omigosh-a-party-member! Um, yes please! Um, what do you need? I'm Amber, by the way."

"Carlos. At the moment, I just need three copper for some stew, but if we'll be adventuring I should get some armor and equipment too."

"Oh, is that all?" Amber quickly pulled out three small coins from her belt pouch, but paused before handing them over. "You really mean it about joining my party, right? Promise you won't leave before doing even a single adventure with me?"

"I take it you've had a lot of people do that before."

She nodded glumly. "All the people I've tried to party up with around here say I'm too annoying and want nothing to do with me."

"Ah." Carlos had a hunch about why Amber's other would-be party members found her annoying, and if he was right this could turn out being perfect for him. "I promise to at least stay in your party for one adventure. After that... we'll see. I don't want to get your hopes up too much."

Carlos soon returned with his own bowl of stew, and once he'd taken the edge off his hunger he decided it was time to strike up a proper conversation. "So, what's the book you're reading?"

"Hmm? Oh, um, n-nothing special. Just something to pass the time."

Carlos raised an eyebrow at her. "Whatever it is, I'm not going to make fun of you for it. I'm just curious."

Amber blushed slightly. "Is it that obvious?"

"A bit, yeah. Anyway, the book?"

"It's Introduction to Magical Theory for Beginning Mages. Written by the famous archmage Sandaras! It's said he can destroy a whole mountain, no a whole mountain range, with a single spell, and dragons flee when they know he's coming. And someday, I'm going to match him!" Amber paused and looked down at her feet before continuing more quietly. "Uh, I mean, I hope I will. I want to try."

Carlos held back a chuckle, and just nodded. "It's good to have great ambitions, and it's good to acknowledge that they will be difficult."

"You- you really think so? You don't think I'm being silly?"

"Yes, I really think so. And everyone who showed you that attitude deserves a round scolding. Now, I happen to be very interested in magic, but never really had a chance to learn before. Would you mind explaining some of the basics?"

Amber just stared for a moment, her eyes unfocused, swaying slightly. "Um. Ok. I've never had anyone actually interested in hearing me talk about this, everyone always tells me to shut up!"

"Then they're all a bunch of idiots who will never be archmages like that Sandaras guy. So, the basics of magical theory?"

"Oh, right. Ok. To start with, there are the four foundations of magic: mana, incantation, meaning, and direction. The first foundation, mana, is the energy that powers all magic. Uh, not that I thought you didn't already know that, but-"

Carlos held up a hand to reassure her. "It's ok. Feel free to pretend I know nothing at all about magic. It will be easier to make sure you don't miss something I actually don't know that way." Internally, he smiled a little. It was also a convenient excuse for not revealing that it wouldn't be pretending.

Amber took a deep breath and nodded. "Ok. Thank you. All living things generate mana, even plants, but most of them don't use it. It gradually flows out into the environment, forming ambient mana that mages can tap into in addition to their personal mana. It also gathers into larger concentrated flows, but only advanced mages with a lot of experience can use those.

"The second foundation is incantation. In order to cast a spell, a mage must give the mana proper instructions about what to do and how. Usually, this is done by speaking, but enchanted items are made by writing the instructions on them, and some legendary mages supposedly could do it by just thinking." Amber dipped her bread in her stew and took a bite before continuing.

"The third foundation is meaning. A mage must know what the incantation means in order for it to actually work. In fact, theoretically the actual words spoken could be anything as long as the correct meaning is attached. The meaning must be very precise, unambiguous, and arranged in the correct structure, however, and it is very difficult to get all of that right with improvised non standard wording.

"The fourth and final foundation of magic is direction. A mage must focus intent to direct the mana to affect the intended target, in the intended way. The nature and power of a spell's effect is determined by the amount of mana it uses, and the incantation and its meaning, but those alone are akin to a drawn bow with an arrow nocked; the spell must be aimed by the mage's intent."

Carlos nodded with intense focus, trying to memorize everything he could from what Amber was saying. "Are these foundations all that is needed for someone to cast a spell? If I spoke an incantation, knew what it meant, and directed it at the right target, would it work?"

Amber chuckled. "In theory, maybe. But if it were as easy as you make it sound, everybody would be mages. The really hard part is getting the meaning right. You have to know what the incantation means, and hold that meaning in mind while you say it, and some parts of most incantations have kind of bizarre meanings."

Carlos rubbed his chin, thinking. "What if you break the incantation's meaning down into smaller parts? Shouldn't that make it easier to understand? I imagine you'd have to put it all back together again to actually cast the full spell, but what about to help with just learning it?"

Amber shook her head. "Oh, no, that makes it a lot harder. You'd have to understand each word on its own, plus the structure of how they fit together, in addition to what the spell does and how, and there are words in most incantations that I'm not sure anyone really knows what they mean when singled out without the rest of the spell. Maybe not even Sandaras for a few of them."

"Huh. Does that book have an example incantation I could read?" Carlos was curious to see what his wish-born translation ability would make of it.

"Sure. It's a simple light spell, to make a dimly glowing ball of light." Amber turned back several pages in the book, skimming rapidly, then held it out to Carlos. He looked, and stared in shock at the crisply formatted monospaced text block he saw overlaid on what was actually written in the book.

spell begin;

use mana = 0.1;

loop begin;

parameter color = white;

parameter shape = sphere;

parameter direction = all;

parameter intensity = 0.01;

parameter location = target;

effect glow;

loop while = (any mana unspent);

spell end;

spell cast;

"Wait, what? Magic is programming?"


Tip: You can use left, right, A and D keyboard keys to browse between chapters.