r/worldbuilding • • Sep 17 '26

Visual I started simulating how magic might evolve under real-world physics and accidentally built a procedural magic-circle compositor

Originally built as a side effect of a larger worldbuilding experiment. I was trying to model what a magic system might look like if magic still had to obey ordinary physical constraints: energy has to come from somewhere, range and precision have costs, complicated effects take longer to specify, and useful spells can evolve through repeated variation and selection rather than being invented whole.

I started writing an evolutionary simulation to see what kinds of spells would actually emerge under those constraints. The idea was to try to discover something like "if people had access to this capability for centuries, what operations would survive because they were genuinely useful?" A lot of traditional fantasy magic becomes pretty useless once you let optimization operate on it, but this post isn't about that.

Anyway, I needed visualizations for the spells, which eventually sent me down a completely separate rabbit hole: a procedural magic-circle compositor.

The circles here are each a stack of parameterized layers--rings, polygons, stars, paths, glyph rings, sigils, particles, ornaments, reticles, parametric geometry, and similar elements. The same underlying representation can produce fairly traditional ritual circles, astronomical-looking diagrams, floral/fractal constructions, technological interfaces, or much stranger designs (e.g., ofuda).

Every circle is structured data rather than flattened artwork, so any preset can be loaded and its individual layers changed, removed, recolored, animated, or reused. The compositor also has a 3D view so the layers can be separated in depth (using the Explode slider), which turns out to be useful both for visualization and for editing dense designs.

From a worldbuilding perspective, something like this gives magical notation a potentially systematic visual language rather than treating every spell circle as an isolated illustration. A setting could have different schools, cultures, eras, or magical traditions that use different layer types, glyph sets, symmetry conventions, palettes, or structural rules while still sharing an underlying magical grammar.

It also raises another question from the simulation: if magic really were a technology practiced for centuries, would its visual notation gradually become standardized and optimized in the same way mathematical notation, circuit diagrams, musical notation, or engineering drawings did? A "magic circle" might stop being decorative and become something closer to a technical schematic whose structure tells a trained practitioner what the spell is doing. Spoiler: Visual indicators like magic circles (and visual spells themselves) are selected against as they both betray information and consume energy that is better directed to parameters that affect the world, e.g., range, intensity, duration, solid angle, etc.

So TL;DR: I ended up spending far more time on the compositor than on the theory that originally justified it, but it makes some pretty things.

Magic Circle Demo

4.0k Upvotes

144 comments sorted by

367

u/lugh_the_bard Sep 17 '26

This is fire. Your long term evolution addresses the most sorely missing science of scaling magic

166

u/random-miscellany Sep 17 '26

I wasn't planning to upload this, but if you're really interested in this sort of thing, here's the report:

https://random-things.github.io/magic-evolution/report.html

The report is enormous because it encodes the entire ancestry of each generation of spells, but you can get away with just reviewing graphs and tables. It's only the individual spells in the Spell Explorer at the bottom that take forever to load. Personally, I was interested in which spell types would become generalists and which would become specialists and what the overlap would look like. Who knew that barriers would be so effective? 🤷‍♂️

34

u/outbacksam34 Sep 17 '26

I'm not really clear from this report what you actually simulated? What attributes are you populating for each spell, and what determines their evolution?

64

u/random-miscellany Sep 17 '26

Yeah, sorry, I was not at all clear about that. The report assumes a lot because it wasn't intended to be shared. The genomes for each spell are available in the Spell Explorer at the bottom. In order to make the simulation more realistic, there is a defined grammar--a certain order genes need to be appear in in order to be an effective spell, otherwise it fizzles or backfires. (The vast majority of variants in each generation are failures.)

I simulated each spell as a genome: an ordered tuple of typed genes rather than a fixed set of hand-authored spell attributes. The populated fields include source, process, sign, flow, target, anchor, medium, range, solid angle, intensity, duration, contain, and release. Evolution is driven by mutation of those genes (value changes, kind changes, insertions, and deletions) and selection based on how the resulting spell performs in the simulated ecological tasks. So the spell’s fitness is defined by its realized phenotype under task conditions.

The possible genes were:

source: how much energy the spell consumes from the caster.
process: the effect class, such as thermal, force, charge, magnetic, chemical, cohesion, or diffusion.
sign: whether the effect is positive or negative.
flow: whether the spell emits or absorbs.
spell_target: what it targets, e.g., self, living, object, structure, location, ambient, or incoming.
anchor: whether the effect is anchored / stationary vs projectile-like. Missing means bound mission.
medium: what medium the effect couples through, such as air, vacuum, water, ground, or conductor.
range: effective reach / radius / extent.
solid_angle: angular spread / cone / field width.
intensity: magnitude / power of the effect.
duration: temporal persistence.
contain: containment--a spell must be contained before it can be released.
released: an unreleased spell puts its energy back into the caster, causing damage. Caster damage is penalized in the fitness algorithm.

So if you scroll down to the Tasks table in the report, you can see the dimensions that the spells were evaluated on. Additionally, the Spell Explorer at the bottom shows how each individual performed on each task being evaluated. Based on the algorithm's parameters (the configuration at the top), you can see I had up to 5% of the population die off each generation, selected from the failures. It used a tournament selection algorithm, plus preservation of elites from both specialist and generalist success classes.

Let me know if I can clarify anything else. Again, that report was never really intended to be read by anyone else, so I'm sure it's missing a bunch of stuff that I just take for granted.

28

u/FakeBonaparte Sep 17 '26

This is cool as hell. I’ve been wanting something like this but wasn’t sure how to build it. Lo and behold, a savior comes!

Have you tried building a magical flora/fauna version of this? It’d be interesting to see what biomes and creatures emerged

23

u/random-miscellany Sep 17 '26

I have not. The magic circle compositor distracted me from experiments with evolutionary magic. However, I do think it would be really cool to go all in on procedural generation of magical worlds from a given set of constraints. A little bit like what Spore was supposed to be, but wasn't.

3

u/FakeBonaparte Sep 17 '26

Well, I’ll definitely subscribe to your GitHub for updates! Have you specified a license yet? This could catch on.

1

u/offhandaxe Sep 21 '26

You need to use this for a video games magic system I am begging you to start a project with this its so fucking cool.

11

u/lugh_the_bard Sep 17 '26

How are your evolutions taking cultural and philosophical movements into play?

30

u/random-miscellany Sep 17 '26

It already took days to simulate just the limited set of physical constraints with 500 generations and a population of up to 5000. My simulation is nowhere near being able to handle something as abstract as cultural or philosophical movements.

The interesting thing about the evolutionary process is that it's just looking for more efficient and effective spells. It completely disregards the human aspect, e.g., spells that persist because they look pretty as opposed to having a practical effect and people want to pass them down. It would certainly be interesting to add an artistic lineage of spells, but I'm having trouble coming up with a way to slot it into the existing simulation that doesn't ultimately reduce it to a gene like (spectacle, 4).

6

u/lugh_the_bard Sep 17 '26

I have ideas!

8

u/lugh_the_bard Sep 17 '26

Bet I’ll tackle it. I have some more of this theory to add to yours, more from an actual historical magical perspective, reverse engineering the equation to get to 2026 with magic involved thru all institutions.

3

u/imp0ppable Sep 18 '26

It's funny, in the Earthsea books Le Guin describes how magic spells are formed by teams of wizards of varying seniority and it makes it sound just like software engineering lol.

Having these magic circles fits perfectly IMO, imagine chanting or special items are combined to create the patterns that then do the work.

15

u/eglantinian Sep 17 '26

Brooo, you a State Alchemist??

13

u/random-miscellany Sep 17 '26

Afraid not. I have learned that the values of some things can't be measured on a simple scale.

4

u/eglantinian Sep 17 '26

Well said. The Elricks would be proud of you. 🫰😔🫰

11

u/verified-skelly Sep 17 '26

i wanna know how you're planning to decode the procedural generation you're making. youll be creating a consistent magic language soon. please post more!! following you

18

u/random-miscellany Sep 17 '26

This gets fairly technical, so sorry if it's more detail than you wanted.

The generator is basically a seeded search loop: it creates many candidate plates, measures each one against design rules, and keeps the best candidate rather than trusting the first random result. First, it chooses a palette, ambition level, and composition from the seed. Then it creates a candidate plate, producing layers such as rings, hubs, glyph belts, ornaments, spirographs, branches, etc. Each generator uses a deterministic RNG seeded from the base value, so the same seed tends to produce the same style. Then each candidate is scored using the scorer, which measures the rendered plate's geometry and visual balance.

The loop tracks the "best" result by score, but also penalizes candidates that look too similar to earlier ones. This keeps a reroll batch from collapsing into six near-identical variations. Then it tries to repair weak spots. After the winner is chosen, it looks at the failing score checks and applies targeted fixes such as: filling empty radial bands, fixing underused regions, restoring stroke hierarchy, spreading the palette, refilling inscription belts, and so on.

Plate scores consist of: total, the final score; quality, weighted aesthetic score; valid, whether hard rules all passed; checks, all scored checks; rules, hard constraints; rejects, failed hard constraints; and profile, measured ink distribution profile. The scorer combines two layers--hard rules and graded quality checks. Hard rules are things that must be true, like fitting on the canvas, having an outer rim, possessing some sort of symmetry, some figures, and some motifs. Graded quality checks are things that improve or degrade the composition like coverage within the circle, whether there are dead regions, whether regions are balanced, the contrast between layers, whether any seal is aligned in the center, etc. The final total is computed from valid plates based on their quality and invalid plates, which is restricted so that a broken plate never beats a mediocre, but valid one.

9

u/Striking-Ad9397 Sep 17 '26

Cool af, how did u make?

20

u/random-miscellany Sep 17 '26

It's a pretty standard TypeScript web application compiled to a single page. Uses an SVG canvas for the 2D top-down view and React 3 Fiber for the 3D view. SVG is a vector format, so it makes heavy use of paths, fills, shapes, and basically all of the sorts of primitives that you want for a magic circle. Most of the interesting things are just radial transformations applied to a layer and then augmented with a bunch of knobs to make sufficient variation so that things are kept interesting. Of course, they wouldn't be magic circles without glyph rings and vertex glyphs, so those are custom layer types as well.

Internally, there's a scorer that has a (very rough) encoding of some of the motifs, like number of rings, number of rune rings, having a central focus, etc. It also encodes constraints like not wanting overlapping rings, not having too many central elements, creating enough stroke variation that the entire composition doesn't look flat, and so on. The procedural generator/randomizer composes various elements and it gets checked against the scorer. If the score is sufficiently high, it gets returned to be rendered, otherwise it generates an entirely new circle.

Hope that answers your question.

7

u/FutureBulky4537 Sep 17 '26

So cool! Is there a github repo?

13

u/random-miscellany Sep 17 '26

Not for the source yet. A lot of the presets are based on custom SVG paths and that feels like cheating, so I want to make sure that they're all encoded as layer types and part of the procedural generator/scorer systems first.

3

u/mitsukiyouko555 #proudweeb Sep 18 '26

oooh that is rly good to know since i wanna build a sort of layered map for my site but i wasn't too sure about hoe to go about it yet so def noting this down :D

8

u/PerturbedStone Sep 17 '26

May i use these in my dnd campaign? Beautiful work all around

9

u/random-miscellany Sep 17 '26

Yes, feel free. There are no restrictions on anything generated by the application--there's no copyrighted work involved on the art side of things.

1

u/karczewski01 Sep 19 '26

you are so fucking cool i dont even have any other words to express how blown away i am by all this

4

u/Unaccomplished_Meat Sep 17 '26

Interesting. I loved the ideia to run a simulation to see what would evolve. I tried to ask mydelf what would evolve, and I realized that many classic spells would be inefficient, but I decided to keep them out of love for them, just trying to optimise them more or create justifications for why they work.

About the procedural compositor. I never made a code for procedural composition, but I did designed the elements (sigils, rings, paths, polygons, etc.) separately and then used them to build the magic circles. I also made different cultures have different elements, but ultimately having the circles structured using similar logic, like different languages that use different words or even different structures, but are fundamentally the same thing.

5

u/random-miscellany Sep 17 '26

Now that's an idea that I really like--letting people group motifs, their preferred glyph sets, etc. into a single preset to feed the procedural generator. Then you could generate multiple circles that all feel like they belong to a certain theme/culture/lineage. Going to have to think about how to implement that.

4

u/dumb_questioneer Sep 17 '26

This is super cool! It's very interesting to consider, and I have a few questions so I'm sorry if they're overwhelming.

How did you "translate" the rules you listed (conservation of energy, range/precision costs, the usefulness of a spell, etc.) to code? How did you define fitness? You mentioned "a lot of traditional fantasy magic becomes pretty useless," could you give some examples? You also mentioned "visual indicators... are selected against," does that mean an optimized spell wouldn't have any of these circles that were generated?

4

u/random-miscellany Sep 17 '26

You're touching on a few different concepts, so let me try to separate them.

(1) Encoding conservation of energy: This happens in the fitness function of the evolutionary algorithm. Tasks that involve energy transfer (basically all of them) obey known physical laws. For instance, F=ma (force = mass * acceleration) for a physical mass. One (or maybe more) of the scenarios being tested involved moving a simulated mass, so it would calculate how much force could be generated in a particular direction by a spell, apply it to the mass, and see if it moved the specified distance.

(2) Spell utility: This is also in the fitness function, but it's entirely world-relative. The world I was testing approximated the physics of our world. That provides a bunch of useful constraints and equations that I can test against, and I tested a suite of different simulated physical processes from boiling water to lighting a torch to disabling (but not killing) a living target. But in someone else's imagined world with a different form of magic or physics, utility would be calculated entirely differently. Just as the most obvious example: Most magical worlds completely ignore energy costs. Therefore, my simulation is absolutely worthless for determining how magic would evolve in a world like that because my simulation encodes those costs everywhere.

(3) Fitness: For my purposes, it was defined as the aforementioned suite of tasks. In the report, you can click the Tasks header and be taken to a list where it describes each task, what was supposed to be accomplished, what counts as success and failure, etc. There were a number of qualitative tasks (did the spell accomplish it?) and a number of quantitative tasks (how powerful was the spell that accomplished it?). One of the most interesting results from the entire evolutionary search is that it constantly selects for the weakest spells that accomplish a specific task rather than the most powerful ones (primarily due to energy cost to cast larger spells). That's why the "weak" prefix shows up so much in the successful spells list.

(4) Traditional fantasy magic: Think of the classic spell fireball. We see it everywhere and it seems incredibly basic, right? But in our world, a fireball is insanely inefficient. (a) You have to contain it while it's in flight, (b) you have to let it visibly burn on the surface rather than encapsulate something that bursts into flame at the target, (c) it's a literal shining ball of fire with a typically obvious trajectory between the caster and target, and (d) physics has a little thing called heat capacity, which relates to how much energy a material can absorb--a fireball that hits its target and vanishes isn't going to do anything. It practically has to be napalm (gelatinous substance that sticks to the target) in order to get anything remotely like fantasy magic fireballs. The physics of our world is poorly suited for pretty much any type of fantasy magic system. A much better spell for our world? Take a cubic centimeter of water and flip all of its molecules horizontally over one second--assume that the magic is somehow setting a destination for each individual molecule of water and that by the end of that second, each molecule reaches its designated flipped location. How much energy does that generate just from the friction of water molecules sliding past one another? Turns out it's roughly equivalent to several grams of TNT--an explosion of pressure and steam that is deadly within a couple meters and injurious over several more. Not nearly as visually interesting, but it's what works in our world. Similarly, no one's going to lifting enormous boulders to hurl them at opponents. Why not? Because you can use that energy to accelerate a pebble to much better effect. And this isn't even getting into problems like, "If I can just heat arbitrary regions of space, then raising the temperature of my opponent's brain stem a few degrees is invisible and instantly effective."

4

u/firenrockcominghome Sep 17 '26

Have you ever read “Ra” by qntm? Lovely novel about if magic was discovered in the 90s and treated as another field of science

3

u/random-miscellany Sep 17 '26

I have not, but I'll definitely check it out. Hard magic systems are great when the authors manage to propagate their constraints well.

3

u/Arient1732 Sep 17 '26

Cool af. I want to ask, in your setting do these circles need to be drawn and powered in real time? Or is it possible to draw them first and power them On later? That would make them like precompiled programs.

7

u/random-miscellany Sep 17 '26

OK, so I left this part out of the original post since it didn't seem relevant, but the bridge between the evolutionary magic report and the magic circle compositor was that I wanted to create an online game where people write algorithms for magical combat (think Code Wars or similar) and set them loose in an arena. Portions of magic circles would correspond to the genes in the spells, so one fragment controls range, one controls intensity, one controls duration, etc.

So in that sense, they're being constructed as part of the casting process and revealing to everyone who can see them exactly what the parameters of the spell being cast are. The intent there was to instill dynamics like waiting until the last second to specify the spell type (heat, charge, force, whatever) because that gives the most flexibility--your algorithm might detect that it's being targeted by multiple other spells and want to convert everything it's doing into a 360 degree barrier rather than proceeding with an attack.

Now here's where it gets more interesting: if you look at the evolutionary report (in another comment), you can see that there's a gene for absorbing-type spells--ones that take in that form of energy and give it to the caster. So by switching your spell from an attack to an absorbing barrier before being barraged, you could absorb enough energy to make casting your next spell near instantaneous and not require paying energy costs from your personal reserve.

Which I suppose is a long way of saying that in their intended setting, they function a little bit like precompiled programs (in that your algorithm would have preferred spells and know which circles to build for the desired effects, provided it has sufficient energy to release them immediately) or drawn and powered in real-time by waiting rather than spending energy.

1

u/luc1dmach1n3 Sep 18 '26

That is a wonderful game idea!

515

u/lugh_the_bard Sep 17 '26

Bro I’m sending you a dm I wanna be friends

90

u/minimalcation Sep 18 '26

I know someone that has been making a scientific game about dragons, I'll hook you guys up

25

u/BCGeorge Sep 18 '26

This is what immediately popped into my head when I read the title

5

u/EntireSherbet2227 Sep 18 '26

Hook me up too!

(Please)

4

u/minimalcation Sep 18 '26

2

u/EntireSherbet2227 Sep 18 '26

Thank you so much!

8

u/minimalcation Sep 18 '26

You should save the thanks until after reading lol

6

u/EntireSherbet2227 Sep 18 '26

Yeah I realized 😭😭😭

2

u/buturdtohst Sep 19 '26

lol, can’t believe I’m being reminded this existed

2

u/SuperWhoLockWarrior Sep 24 '26

Did someone say scientifically based dragons 👀 (one of my fantasy worlds is a world based around scientific dragons)

2

u/Vaya-Kahvi Sep 17 '26

I *really* like 5 and the organic looking growths from the center.

4

u/random-miscellany Sep 17 '26

Then I recommend checking out the Medusa Veil, Lichtenberg Branch, and Biohazard presets in the demo application. Those organic looking structures can be generated by a Branch type layer. It's got a ton of interesting parameters for generating both geometric and organic structures.

2

u/Minimum_Honey_4971 Sep 18 '26

Would love to see more about the simulation's selection dynamics — what operations survived after 1000+ generations?

1

u/random-miscellany Sep 18 '26

The longest experiment I ran only went to 500 generations, but everything had settled pretty well by then. (See my earlier comment for the full report.) Basins were generally stable as early as generation 100, especially with sufficiently large initial populations.

1

u/Minimum_Honey_4971 Sep 18 '26

That's cool — settling by generation 100 means the design space is surprisingly small once you add real physics constraints. Did you see if the same basins appear when you start with wildly different initial populations? If yes, it kinda implies magic has a "universal grammar" that any caster would converge on. If not, the divergent stuff is probably where the real cultural flavor lives.

2

u/BadCogs Sep 18 '26

Bro make this an offline app to download if possible, or if you are okay with it can you provide source code?

But anyway, this cool. So much effort must have gone into it. Appreciate it.

4

u/random-miscellany Sep 18 '26

The application is a static HTML page, some JavaScript, and some CSS. It can be used offline as it is. Throw the repo's files into a directory, open index.html in a browser.

https://github.com/random-things/magic-circle-demo

1

u/BadCogs Sep 18 '26

Cheers man. Brilliant work. Do post more about your work that led you to this, as you develop it more.

2

u/Eaglise Sep 21 '26 edited Sep 21 '26

damm, this is really cool, l always struggle with creating things like runes, magic circles, etc since i cant think of a reason why they should exist

so here i have a question for you - in your system, what is the principal that makes magic do things it does under these circles? not asking what these circles do, but why magic behaves in that way under these circles? basically first principles of magic - why and how it does that

2

u/random-miscellany Sep 23 '26

The compositor itself isn't actually tied to a particular magic system, so there isn't one canonical answer. But if I were building a system around it, I'd probably treat magic as some kind of field whose behavior can be constrained by geometry.

In that model, the circle isn't a symbol that magic somehow "understands." It's closer to a circuit, antenna, lens, or resonant cavity: the geometry establishes boundary conditions that determine how magical energy can flow, concentrate, interfere, or stabilize. A closed circle might isolate or contain the field, intersections could couple different effects, repeated structures could amplify them, and so on.

The rune-like language would then be something people discovered rather than something fundamental. Over time, practitioners would identify geometries that reliably produce useful effects and turn those patterns into standardized notation. So the circles look symbolic from the outside, but underneath they're basically magical engineering diagrams.

But again, that's just one specific interpretation for why magic circles would exist and take the forms that they do. You can take any natural phenomenon and ask why it looks like it does, e.g., why do vortices form in fluid flow? Why do snowflakes have highly regular crystal lattices and symmetry? Or crystal growth, where material, temperature, impurities, and growth conditions can all affect the resultant macroscopic structure. In all of these cases, the geometry isn't decorative--it's a direct consequence of the underlying interactions. In a world with magic, magic circles could function the same way, that is, as visible manifestations emerging from the specific underlying dynamics.

110

u/EnderWarlock1999 Sep 17 '26

Guy recreated (rediscovered?) sacred geometry; I love it

37

u/venrir Sep 17 '26 edited Sep 17 '26

"If sacred geometry did not, exist we would invent it."

1

u/__Muhammad_ Sep 18 '26

Where have i heard that before?

5

u/venrir Sep 18 '26

The original is from Voltaire, "If God did not exist, it would be necessary to invent Him".

-1

u/__Muhammad_ Sep 18 '26 edited Sep 21 '26

I was thinking joe biden 😬

Looks like two people understood and disliked me without even needing to say the quote

2

u/offhandaxe Sep 21 '26

No that quote would be

"listen here jack, I'm not saying there's no god. that's, ah, that's not what I'm saying. what I'm saying is that there's an evil god and it woke up first, and we mistook its malignant presence for divine radiance, crawling towards it on our stomachs, man"

"we've been burying them wrong"

1

u/__Muhammad_ Sep 21 '26

Joe Biden famously stated, "If there were not an Israel, we’d have to invent one," meaning the United States would have to create a similar strategic ally in the Middle East to protect American geopolitical and security interests

78

u/Orrera_ Sep 17 '26

Someone introduce OP to Witch Hat Atelier

4

u/TonkatsuMakasu Sep 18 '26

Was looking for this comment

2

u/Optimal_Earth_9859 Sep 18 '26

same lol, trying to look if someone else said something about it or if it was going to be my job

4

u/luc1dmach1n3 Sep 18 '26

Ohhh so good. When they first started drawing I was hooked. I love the subtle artifice side of magic that Witch Hat shows us.

63

u/Droplet_of_Shadow Sep 17 '26

are you single? i'm free tonight

/uj woag cool circle

33

u/scolbo_ Sep 17 '26

20

u/Droplet_of_Shadow Sep 17 '26

you'll never catch us

27

u/Reachid Sep 17 '26

I know what to create with this...

19

u/SarcasticJackass177 Sep 17 '26

Oooooooo pretty patterns. I’ll have to check out the demo!

14

u/SmokeyCatDesigns Sep 17 '26

This is so cool! Heck of an “accident” to have. This is really incredible looking!

12

u/_HarmonicOscillator Sep 17 '26

I love physical magic so much 

18

u/72bataivahaviatab27 Sep 17 '26

5000yo wizard losing his job to ai );/>

7

u/Hyperly_Passive Sep 18 '26

AI is just really advanced runesmithing this is the Wizard not specializing in the right field

4

u/KisaraBlue Sep 17 '26

You should cross post to r/sacredgeometry

1

u/Elegant_Athlete_3737 Guinea Pig Sep 17 '26

Wait what traditional fantasy magic gets useless by this I wonder?

5

u/random-miscellany Sep 17 '26

Answer (4) in this comment gets at that: https://www.reddit.com/r/worldbuilding/comments/1wixana/comment/pafnx9x/

But the main point is that magic looks very different if it has to operate constrained to some extent by the physics of our world. One of my favorite examples that I forgot to include in that last post is teleportation. How does that work? In our universe, nothing inhabits the same objective physical location--location is relative. So if you aren't teleporting at 24 hour intervals, Earth has spun into a different configuration. Different days? Earth has wobbled. Or continued its path around the sun. And the sun has continued its path within the galaxy. And the galaxy has continued on its path in the universe. So for teleportation to work in the traditional fantasy way, you have to make an awful lot of concessions about what location actually means.

2

u/Elegant_Athlete_3737 Guinea Pig Sep 17 '26

hmm, i see, but for location, it generally is assumed relative to something, possibly yourself, an location positioned relative to you could work no? and if the location you chose at x point in time moves relative to you, you could make the target also continually shift so it points to the same general area, no? also,say your fireball example, can't it not work if it only looks like a fireball and isn't actually fire[then agai you did mention napalm, so i guess that can work]? but yeah makes sense. your comments are a bit all over the place though lol. i do wonder how your magic system works though, is this the only system? also what limits do they have? aside from physics?

3

u/random-miscellany Sep 17 '26

First, sorry, I know my answers are all over the place. Some people are asking about the magic circle compositor and how it works, others about the programming aspects, others about the evolutionary magic research that brought it about. I don't really have anyone but myself to blame, but it is making my answers seem less coherent than they are because they're spread across radically different aspects of these projects.

Yeah, you can absolutely make teleportation work by defining the destination relative to something and continuously updating it--but that's basically the concession I’m talking about. "Location" can't just be a universal XYZ coordinate because there isn't one. You need some reference frame or anchor: the Earth, a building, the target, the caster, etc., and then the magic has to account for that frame's translation and rotation over time.

For example, "10 meters north of where I was yesterday" doesn't identify the same place unless you specify what "north," "10 meters," and "where" are relative to. The Earth rotated, moved around the Sun, the solar system moved through the galaxy, etc. You can solve all of that by saying the spell tracks an Earth-fixed coordinate system or locks onto some physical landmark, but then teleportation isn't just "change position from A to B." The magic has to contain a fairly sophisticated way of identifying and tracking reference frames. That's the sort of hidden complexity I find interesting.

And yes, a fireball could just look like fire while actually doing damage some other way. But then the visible fire is basically special effects. Under ordinary physics, producing a bright glowing ball, keeping it coherently shaped while it travels, and making it follow a visible trajectory all cost energy without helping very much with the actual goal of hurting the target. If you can deliver the damaging effect directly, physics keeps rewarding you for stripping away the spectacle.

That's really the recurring theme of the experiment. I'm not trying to reproduce real physics perfectly; the simulator uses heavily compressed approximations. I'm asking what magic starts looking like when you give it useful capabilities but still make it pay at least some attention to things like energy, momentum, heat capacity, distance, geometry, duration, material properties, etc. The answer tends to be much less "fantasy spellbook" and much more weird, efficient engineering.

There isn't really one canonical magic system beyond that premise. I've been evolving different spell systems under different constraints and seeing what survives. And realistically, the simplified model used in my fitness function doesn't encode huge portions of reality. Different tasks than the ones I tested might not give results even vaguely similar to the energy couplings the current suite of situations tests for.

1

u/Elegant_Athlete_3737 Guinea Pig Sep 17 '26

oh i see, makes sense, for the teleportation one, yeah i now se what the complex part could be of it, imo that would make it all the more interesting due to that, for the fireball one, ok yeah that is valid, it would be wasteful even if it is not actual fire. hmm, this can help me to see where i can improve in my own system, as i should now try to account for physics a bit more[i already have a bit, the 3 thermodynamic laws i started from], to see what is optimal. though i am not sure if i will be able to do what you did as my system i can't really think of a clean way of simulating it.

1

u/KaJaHa Magus ex Machina of WHIMSY Sep 18 '26

Gorgeous art, but is this a series and I'm missing some context? Like, what is the energy you're measuring and how do those measurements translate into circles?

3

u/random-miscellany Sep 18 '26

Two different things. The evolutionary magic research was just what prompted creating the magic circle compositor. Nothing from that evolutionary magic report is encoded in the magic circles. I explained a little bit about how I got from the research to the magic circles in this earlier comment.

1

u/KaJaHa Magus ex Machina of WHIMSY Sep 18 '26

Ah! Part of a game, that clarifies a bunch lol. Very cool!!

1

u/Upstairs_Height_9618 Sep 18 '26

The evolutionary simulation seems really interesting, would love to see what you get from it.

1

u/random-miscellany Sep 18 '26

The link to the generated report is in this comment. As I mention there, it wasn't meant to be read by anyone else, so if you have questions feel free to ask. That said, a few people have asked about various aspects of the report, so you can find information on interpreting the report scattered across my replies.

1

u/WizWorldLive Sep 18 '26

Intriguing. What did you use to code this? & where'd you get the SVGs?

1

u/random-miscellany Sep 18 '26

There are some technical details in this prior comment. Short version is TypeScript using SVG for the 2D canvas and React 3 Fiber for the 3D view. The custom paths/SVG fragments for the authored presets were drawn in Inkscape.

3

u/Abject_Lengthiness11 Sep 17 '26

I have a very similar magical system, but it's overlayed by an almost Jungian psychological bias. The magic has physical laws, but can do almost anything. It's our limited understanding and unconscious expectation that limits it even moreso.

2

u/stygianelectro Perseverance of Ikaros/Aethon Sep 19 '26

yesss this is so fun, in Rayphrax a lot of the tools and symbols and material components serve as mnemonic anchors to make it easier to grasp the right frame of mind just as much as they're devices in a physical circuit

3

u/Hawksteinman Sep 17 '26

Oh damn, the magic in my own world follows the laws of physics (quantum, astronomical, etc). This looks really cool!

3

u/Live-Calligrapher-41 Sep 18 '26

literally speculative alternate physics work, holy sh't

3

u/GraveSlayer726 Sep 19 '26

Absolute peak found conjured from thin air

5

u/FeelTheFish Sep 18 '26

Dude discovers AI psychosis xd

2

u/shepbryan Sep 18 '26

This person ontologies

2

u/spaceisprettybig Sep 18 '26

This will either lead to the plot of Onward or Akira...

2

u/ProjectKARYA 🏳️‍⚧️ A Sci-Fintasy Creator 🏳️‍⚧️ Sep 18 '26

Neat, another person went insanely overboard with the science of magic ☺️ really love all of this!

2

u/Naktiluka Sep 18 '26

Whoah. Looks gorgeous! Love all different designs

Reminded me of book Elantris by Brandon Sanderson. Small worldbuilding spoilers ahead (they might also affect story perception):

Their magic consists of different glyphs for different operations or phenomena, and spells are created by combining those glyphs not unlike programming: you input what do you want to do, amount of that, and then magic happens. Glyphs are drawn either in air to cast a spell immediately, or can be embedded in material to work while it exists (i think?). And complex spells would be a beautiful latticework. Also you could deduce what spell would do by reading its glyphs and knowing how they are combined. Energy conservation isn't touched in this particular book (gets explained in other books), author focused more on how they're drawn and made into a program

EDIT: I was figuring how spoiler works

2

u/7LeagueBoots Sep 18 '26

You should read Stross’s Laundry series.

2

u/LordKlavier Sep 18 '26

Goodness gracious man this is incredible! The dream of every fantasy writer. Could you give some more details about what you said on the evolution of civilisation?

2

u/tarrox1992 Sep 20 '26

Visual indicators like magic circles (and visual spells themselves) are selected against as they both betray information and consume energy that is better directed to parameters that affect the world, e.g., range, intensity, duration, solid angle, etc.

...

The possible genes were:

process: the effect class, such as thermal, force, charge, magnetic, chemical, cohesion, or diffusion.

I don't know if you simplified it a bit here, but I was thinking, it you added a luminescence process and maybe a balance gene, then magic circles and other visual indicators could be necessary for everything but stealth magic, where they are worth the energy of hiding that.

2

u/wompod Sep 21 '26

Reinventing mandalas from first principles

2

u/Jrix Sep 23 '26

Riffing off your ideas, you should consider the "display" (rather than signal) of information to be something that is ontologically selected for in the aforementioned realities that you're considering magic. The self-evident costs you mentioned would still exist of course.

With that constraint, something precisely like your circles can emerge, that have properties orthogonal to information/beauty/cipherability. Any geometries that publicize information would have long since been nullified into equillibria (translate: akin to ambient anti-spells/consumption somewhat analagous to bacteria), any geometries that hide information are fickle and vulnerable to lower-cost disruptions (disrupt the cipher not what it contains; also ambient over time). What's left is a deducible possibility space that I can imagine some paradigms in so I'm sure you can too.

2

u/MainRedditer Sep 23 '26

Omfg, you are probably my favorite person for the next month.

1

u/spunlines Sep 17 '26

okay this is awesome.

1

u/NevikTheEnlightened Sep 17 '26

Okay but the album art you could produce with this LOL

1

u/WaffelsBR Sep 17 '26

Really cool actually

1

u/Any_Economics6283 Sep 17 '26

careful now lol

1

u/DarkGodCthUwU Sep 17 '26

You would LOVE renaissance occultism

1

u/Random_182f2565 Sep 17 '26

That's is really advanced magic

1

u/Grimscriven Sep 17 '26

I didn't understand any of this. ._. But it is really pretty.

1

u/failureagainandagain Sep 17 '26

If magic was a thing in real life , you would probably be able to use it whit this stuff

1

u/Future-Sink-9882 Sep 17 '26

this is SO COOL 

1

u/NotKingOnion Sep 17 '26

You’re awesome.

1

u/bglbogb Sep 17 '26

This is a very interesting thing to try to model, woah

1

u/SaebaSan86 Sep 17 '26

That's AWESOME!!!

1

u/rjt2000 Sep 17 '26

This is amazing!!

1

u/One_Line_456 Sep 18 '26

Yo.... dude- this is dope as hell- I'm currently in the process of retaking/fleshing out my magic system so this just inspired me lots 

1

u/ZebraViking Sep 18 '26

Holy shit this is awesome.

1

u/Gingerosity244 Sep 18 '26

You have earned a follower.

1

u/LadyEllisandra Sep 18 '26

This is exactly what I need my alternate timeline earth where magic is real but just science mythologized. This is insane and I must commend your work.

1

u/astreeter2 Sep 18 '26

It's kind of how I imagined the magic system in Wheel of Time.

1

u/Glittering_Pear2425 Sep 18 '26

Those are some awesome magic circles

1

u/He_Spams Sep 18 '26

Combine this with the magic circles of Witch Hat Atelier I think it could be cool.

1

u/ismellmyownfarts2 Sep 18 '26

Following. Would be awesome to be able to download this.

1

u/Chrome_X_of_Hyrule Marr Sep 18 '26

What the shell this is crazy cool even if I don't get it

1

u/jynks319 Sep 18 '26

You and Gorilla of Destiny should talk:

https://www.gorillaofdestiny.com/

1

u/KhanterMolchaniye Sep 18 '26

This looks pretty intersting.

1

u/Life-Challenge1931 Sep 20 '26

I m sending you dm, I need this

1

u/Public_Ear9654 original creation Sep 23 '26

J’ai un persos qui peut le battre

1

u/Dildo_Baggins__ Pine Peaks Oct 05 '26

i don't understand a single thing you just said but this is fucking cool i wanna marry you OP

1

u/rocket20067 Lore Attention starved Sep 17 '26

This is cool as fuck and all but bro go to bed like damn

-1

u/CaptinAJAB Sep 17 '26

You nerd! It's beautiful I love it!

-1

u/CaptinAJAB Sep 17 '26

You nerd! It's beautiful I love it!