Archived

This topic is now archived and is closed to further replies.

HellRiZZer

True Magic....

Recommended Posts

HellRiZZer    308
Ok, this post is about discussing magic in games(RPGs only??). What I was thinking is creating some kind of "Magic Compiler" that will process magic commands and create various magical effects in 3D. There are lots of explanations of magical systems, such as that main components of it are Water Fire Earth Air These are described as initial elements This was all taken from a fantasy by follower of JRR Tolkien, Nick Perumov. He also got other things such as Walking on ground Growing on ground Thinking on ground Living on ground Lying on ground And some others. So, my main concept is to use these components with others, to create complex hierarchies for complex spells which will look and work completely different if you add or remove one of its components. E.g there must be laws of magic, how to build a spell. Thats what I''m concerned about. How to create or algoritmize such laws?? Thank everyone who was reading my post... " Do we need us? "

Ionware Productions - Games and Game Tools Development

Share this post


Link to post
Share on other sites
Fruny    1658
quote:
Original post by HellRiZZer
How to create or algoritmize such laws??



Your Lab Total is Int + Magic Theory + Intellego + Vim (+ appropriate knacks and affinities). You can also add the Magic Theory of your apprentice if he is helping you in the lab.

Oooops... wrong problem.

Buy the Ars Magica rulebook (Atlas Games). This RPG has the best magic rules I''ve ever seen (based on a Verb + Noun principle).

Share this post


Link to post
Share on other sites
HellRiZZer,

I expect this isn''t much help, but I''ve also become interested in an algorithmic approach to magic. One universe which uses algorithmic magic is the one created by Masamune Shirow in his comic book, Orion, in which spells were governed by "dharmaquations" whose basic elements were "nagas" or lines of force produced by the interaction of fundamental subatomic elements of yin and yang karma. This magic system was interesting because it had its own physics and quantum theory: "psychoscience", which required rigorous study. Of course, throwing a God of Destruction and a giant nine-headed karma reactor together was bound to produce some phenomenal results.

Just saying it''s not a new problem, or one that only you are interested in. I''ll have to check out that Ars Magica book as well, and I''ll also follow this thread with a keen interest. Keep up the good work, and thanks for bringing this up!

---------------------------------------------------
-SpittingTrashcan

You can''t have "civilization" without "civil".

Share this post


Link to post
Share on other sites
HellRiZZer    308
Well, I haven''t read or even seen that book by Masamune Shirow, but I was just thinking about the following:
in magic you got 4 first elements
So, to create fireball you don''t need any complex system, you simply just "take" fire and "give" it a form of sphere or whatever you want, and limit its area with its opposite - water(my theory);
same with lightning, assuming there is no electricity in RPG worlds (except Fallout and Chrono Trigger and some others)
For other spells such as fire wall, circle etc you can use same principle.
For more complex spell such as teleport or levitation or poison, you''d have to combine first elements with secondary elements in some way (by laws) to get to final spell you wanted.



" Do we need us? "


Ionware Productions - Games and Game Tools Development

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Long time listener, first time poster.

I''ve had the same idea for some time now. It''s rather interesting.

First you have to think how indepth you want to make spells.
You can either prescript much of the work already.

simplistic examples
element(strength).radius(5ft).giveform(wall) (fire/earth wall)
element(strength).throwtarget (fire ball)

complex
summon(magic).changeEnergy(strength).giveform.throwtarget (fireball)

''Rotating discs of ice''
summon(magic).changeEnegery(ice).giveform(disc).selfexist.SPLIT.
path1->restart(5 times)
path2->target(newobject:disc).control.SPLIT.path1->end
path2->moveRadiusCaster(5'').restart(inf)
you would of course have to monitor the loop. The telekenisis you can either put that into premade script, or make the player do all the movements themselves. as for the selfexist. This would create the disc a longterm object. This then can be used later, either by orignal caster ot by enemy.
like ''target(disc).control.throwtarget''. Somthing else you could
do would be.
target(withmouse:water).control(strength).giveform(disc).ect...
this method would require

These are rather abstract concepts though. And may not be to clear in representation of idea.

Here are my results so far.
1. Almost everything has to be broken down to base components, for complex spells or make scripted spells like ''wall of element. Then the only value that changes is the element and strength.

2. If you take the complex road it CAN be more rewarding. But greatly more difficult and frustrating.

3. this will require keeping track of state of the spell. whats in a loop. and so forth.

4. Actualy this is my project right now. But I''m far from the magic stage, and still in 3d Engine stage.

Mind my bad spelling. Grammer classes have never been my strong point.

Share this post


Link to post
Share on other sites
HellRiZZer    308
Ok, I''ve seen some of you are interested in that idea and some are already doing something to implement it.
Well, I was thinking of some logical way to create spells.
Let''s have a look on the nature.
It was every one of 4 elements : water, fire, earth and air.
What is the river? Water going in bounds (note gravity effect - where it will go)
What is wind? Masses of air given some energy and direction.
So, what we will have to deal with is basic laws of physics and materials.
I partially agree with Anonymous Poster where he shows example of spell building, but my point is to create a chain of either laws of physics or other elements affecting main one. For example, if we have
(Energy->Fire)->Water - we would have steam or heatered water;
Other example - if we would have
(Energy->Air)->Water - we would have wave with size depending on energy of air;
And so on.
So, what I was thinking is creating either a node(main element) so that other "things" can be binded to it; the final result will depend on how that "tree" will "compile"...

" Do we need us? "


Ionware Productions - Games and Game Tools Development

Share this post


Link to post
Share on other sites
aDasTRa    122
i thought about a system like this a while back, when designing a remake of ultima iv. if you know the ultima games (and you should if you are making a fantasy game), the spells used chants or incantations or whatever you wanted to call them, little quasi latin words. for example, fireball was ''vas flam hur'', which literaly translates to ''great flame wind''. using these words of magic i thought that new spells could be created (or attempted to be created) by using a combination of words and reagents. for instance you could use the normal incantation for fireball, but use four times the sulfurous ash to create a superpowerful fireball.

how would you represent this in code? well consider the above example of the fire ball. you can decompose the incantation into three parts, which i will can the ''size'' ''element'' and ''type'' components respectively. for some types the size element is not required. you could then have a class for each type, say projectiles as own, ones that affect bodies as another, and so on. the element would of course relate to which of the four (or five, or however many you want to work with), like earth or fire. the size would obviously be the relative size of the spell, large, small, huge, et cetera.

there are otherways to break this down, but that''d be up to you...

the same thing would go for reagents, if you were to have them. different combinations, or different elements might require different amounts of reagents.

so using this system ''vas flam hur'' would be a large fireball, and ''bet flam hur'' (bet being the word for small) a smaller fireball.

you''ll probably want to define your own ''grammar'' for spells, and your own words, but i don''t think it is too hard to do.


<(o)>

Share this post


Link to post
Share on other sites
HellRiZZer    308
aDasTRa, you've given another useful approach to my idea!
I will post the laws and examples of use here as soon as I will understand them. Don't by shy and post here your examples, we will try to implement them together since its much better doing it in a company. )
Cheers!

" Do we need us? "


Ionware Productions - Games and Game Tools Development

Edited by - HellRiZZer on January 16, 2002 4:01:33 AM

Share this post


Link to post
Share on other sites
Everyone

Since everyone else is posting examples, I suppose I should give some explanation as to the Orion system. As it''s a work of fiction rather than a game system, the details are sketchy, but they go something like this.

The fundamental karmic particles are the yineron(yin energy) and the yangeron(yang energy). Particles interact to form distinct classes of interactions. These create energy strings called "nagas" with a strength expressed in psyche levels and a complexity expressed in harmonic levels. All physical forces arise from naga-type energy strings, and the human psyche also creates nagas through life energy. Thus with focused effort and specific rituals it is possible to alter psychic and physical phenomena, including creating self supporting psychophysical "reactors" which draw and provide their own energy. Gods and demons are one such type of reactor. In more advanced times, it is possible to apply algorithmic and mathematical insight to the rituals, giving rise to the theory of "psycho-science." Using psycho-science, machines can be created to automatically enact rituals.

I realize this is all a little vague, but the system, as I mentioned, was for fictional purposes only and the author was free to make up new spells by himself... The interesting part in my opinion was the idea of casting spells on a quantum level - that magic is actually the manipulation of fundamental forces through one''s own energy, or energy derived from outside sources. Thus a sorceror can create moderate phenomena himself, but must use large groups of helpers or artificially generated psychic power to aid in enacting large or complex phenomena.

I hope this is in some way helpful... if not, forgive my rambling.

---------------------------------------------------
-SpittingTrashcan

You can''t have "civilization" without "civil".

Share this post


Link to post
Share on other sites
krez    443
quote:
Original post by SpittingTrashcan
Gods and demons are one such type of reactor. In more advanced times, it is possible to apply algorithmic and mathematical insight to the rituals, giving rise to the theory of "psycho-science." Using psycho-science, machines can be created to automatically enact rituals.

robert heinlein (well, probably one of his characters rather):
"One man''s ''magic'' is another man''s engineering."
there was another good one, something like "it is impossible to tell the difference between magic and a sufficiently advanced technology" or something to that effect (damn i suck with quotes)...

Share this post


Link to post
Share on other sites
Tacit    122
Why are people so intent on making a science out of magic? It''s magic goddamit, not chemistry.

The Ultimas use one of the best systems of magic that I can think of, the combination of reagents (physical components required for a spell) and words of power (as Adastra pointed out). Put together in different combinations, you will get different (or no) results.

But, there should be some kind of unexplicable part as well, otherwise what''s keeping anyone who can mix two reagents together from becoming a magic-wielder?

Keep the magic in the magic system! Don''t turn it into some kind of watered down alchemy or something.

Ever read the ''Man of His Word'' series, by (can''t remember the author, sorry). In this fantasy series, certain people had magical powers which they gained from knowing a word of power. If I told you my word of power, you would also get the same powers but we would then both have them at half of what they were when I knew it alone. But, if I had knowledge of more than one word, I became exponentially more powerful. That was a pretty neat idea, I thought.

R.

Share this post


Link to post
Share on other sites
krez    443
quote:
Original post by Tacit
Why are people so intent on making a science out of magic? It''s magic goddamit, not chemistry.

that''s simple: they want something else fun and nifty to do in their games/books/whatever... i''m speaking in terms of a game now... if magic is completely inexplicable and mysterious, you get some spells that you can cast. if there has been research into it, and discoveries made, than rather than being handed magic, people can figure out the details and create their own bigger better spell. this adds a whole new dimension to the gameplay.

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
Tacit    122
Krez...it was a rhetorical question, but meant to make a point. I can imagine why you would want to come up with a system like this, but I think magic shouldn''t be made into too much of an exact science on the surface. In other words, sure, establish an underlying structure so that you can design a game, but keep it mysterious for the player.

Just an idea.

R.

Share this post


Link to post
Share on other sites
krez    443
quote:
Original post by Tacit
Krez...it was a rhetorical question, but meant to make a point.

my bad... i do that a lot...
quote:
I can imagine why you would want to come up with a system like this, but I think magic shouldn't be made into too much of an exact science on the surface. In other words, sure, establish an underlying structure so that you can design a game, but keep it mysterious for the player.

it all depends on if you want the player to be able to develop their own spells, or research into improving existing spells, or figure out the components (reagents, "power words") of an existing spell before being able to use it. for some games this would be completely unnecessary (and annoying), but for others (i.e. an RPG where getting more/better magic spells is more than buying "ICE3" from a shop) it adds a great deal to the game.
think about this: imagine a world where magic actually exists. in such a world there must be someone who knows how to use it, otherwise how would the spells have been discovered/developed/researched? who first figured out how to cast that ICE3 spell? whoever it was must have had some understanding of the mechanics behind the magic (unless they randomly mixed "magical" ingredients while chanting random latinesque "words" and got real lucky). some people are interested in such a thing; they would enjoy a game where you can continue the research rather than using hand-me-down spells.

--- krez (krezisback@aol.com)

Edited by - krez on January 16, 2002 3:38:08 PM

Share this post


Link to post
Share on other sites
Tacit    122
Sure...I see how this could be attractive to some people. Yet another spin on the resource management/tech tree idea that most RPG/RTS games function under.

In another fantasy series I read many, many years ago (I believe it was called 'Master of Five Magics', by Lyndon Hardy), the author created this elaborate system of magic whereby magical power could manifest itself along five basic lines (or schools). They were thaumaturgy, alchemy, sorcery, and I can't remember the others. Anyways, each magic had a different philosophy behind it and granted very specific types of powers. I'm not sure how I would find it now, but back then I remember thinking that it was a pretty clever way to explain magic and formed an interesting structure.

Fantasy novels can hold a lot of good ideas as to how a system of magic can work, and occasionally an author will come along who has a very original way of thinking about magic, different from all the cliched systems. Reading some of these old series might be fruitful grounds for research.

Ursula K. LeGuin's 'Earthsea' trilogy also did a very good job of describing a system of magic.

R.

Edited by - Tacit on January 16, 2002 4:06:28 PM

Share this post


Link to post
Share on other sites
Symphonic    313
Also look at Ultima VIII it had one of the most cumbersome magic systems I can remember, but despite my loathing it did have some cute ideas running behind it.

My work on magic systems implies that (as usual) there is no end-all be-all magic system to be found. I wouldn''t use fire/earth/air/water though, because it''s hard to make up excuses for alot of effects (Where does teleportation fit the mold?), and because, in my own very humble opinion, it''s boring.

For a recent design, I recommended a system that requires the collection of "influences" which can be absorbed by magic talismans. The character may then release influences in combinations to produce a desired effect (order of choice matters).

As far as implementation works, you will want to use a set of rules in order to simplify the process of creating spells, however, as has been said already, unless your game-world requires you to do so (as in my previous example), it would be best not to let the player identify the mechanics behind spells.

George D. Filiotis
Are you in support of the ban of Dihydrogen Monoxide? You should be!

Share this post


Link to post
Share on other sites
Argus    118
quote:
Original post by Tacit
In another fantasy series I read many, many years ago (I believe it was called ''Master of Five Magics'', by Lyndon Hardy)
Wow someone else actually read that series. I thought his system of magic was quite well done too - he had a little piece at the start of each book explaining a part of it.

And I agree with Symphonic - Fire/Water/Earth/Air has been done to death. But any magic system is better than none (eg. diablo).

Share this post


Link to post
Share on other sites
Daggerfall, an enormous RPG released a while ago, had spell "classes" similar to the ones Tacit mentions. Like thaumaturgy, alchemy, etc. It was VERY complicated.

Master of Magic, a turn-based strategy similar to Civilization, had 5 classes as follows:

Chaos: anything to do with corruption/destruction or mutation (mostly fire magic)

Nature: earth magic

Sorcery: magic magic (!!), spells which dealt with blocking up other people''s spells, etc. Also air magic.

Life: holy and healing magic. positive enchantments.
it also had spells for controlling travel between planes.

Death: infernal and killing/draining magic. negative enchantments. it also incorporated undead and necromatic spells.

An interesting part was the way the classes interacted. Life magic usually opposed Death and Chaos. Nature magic was immune to many of the other classes, while Sorcery magic tinkered with all the other classes.

I always thought the Ultima chants were cool too, always felt like I could try different combinations of words and come up with cool spells.

Share this post


Link to post
Share on other sites
HellRiZZer    308
Ok, so lets actually compose our magic world, ok?

We will have 5 major elements - Fire, Water, Earth, Air, Energy;
5 Secondary elements - Chaos, Darkness, Light, Nature, Void;

And we may add some other elements on our way...
Also, lets add simplest law for each element -
You need Energy to keep the shape or "form" of magic element when you give form to it;

lets have a Unit of element;
1 Unit of fire need 10 energy to keep it balanced inside a form;
(as most chaotic)
1 Unit of water require 5 energy to be balanced in form;
1 Unit of air require 3 energy to be balanced in form;
1 Unit of earth require 1 energy to be balanced in form;

an example - take 1 unit of fire and give it a form of sphere(fireball) and give it the energy of 5 units;

Fireball - 1 unit to be in form; 5 units to hold; total 6 units of energy;

Same with other forms...
This is the beginning, so just post your ideas about simplest laws of magic like this one.
Thanks to everyone who read and post on this topic. I hope we will get to some "useful" end..

Cheers!




" Do we need us? "


Ionware Productions - Games and Game Tools Development

Share this post


Link to post
Share on other sites
TeraByte    122
I read thease posts yesteray and thought about it for a bit, then i devised my own system.
It took me about 2-3 hours unfortunatly i wrote it on another computer so i cant simply copy''n''paste it here....

Heres the basics:


Thre re 3 Main types of energy (well actually 4, no, 5 (ok, im making it sound crapnow but bear with me))
Positive energy (we''ll call it A)
Negative energy (B)
Neutral (or intenal) enery (C)

Then later in my article (which i named: ''Theories of magic science'' for a laff)
i mention another type of energy (which is basicaly a simple structure of excess or left over energy particles)
which i called the (V) structure (because the energy particles are arranged in aV shape)

Also theres one last energy Psych (P) which gives the elements force etc


I devised my own maths system for the energy:
what do you get if you add A+B?
A+A=2A, B+B=2B so far so good
A-A=0, B-B=0
A-2A=B, B-2B=A ok, one step harder but still simple
A+B=C
2A+B=C+A or C/1 umm, i say why in my article
also half way thrugh you learn about the structure of each and then find out about V
C=A+B(+V)
Why? Ok, heres the structure of A, B, C and V: *=energy particle
A:
* *
* *
*

B: Yes A is the same as B only turned at about 20 degress, but still

* * *
* *

C:
* *
* * *
* *

So of you add the A structure and the B structure you end up with a C structure
WITH 3 PARTICLES OVER-LAPPING:
V:
* *
*

I also tell about energy elements such as air, fire, earth, wind etc
which are all structures of energy: {A,B,C}
Water {0,3,0}
Air {1,3,0}
Earth {4,1,0}
or something like that
Those 3 were my BASE elements,all other elements are combinations of those BUT:
There are two more:
Heat {1,2,0}
Cold {-2,-1,0}
which are values you add or subtrac t make a new state: Ice = water + cold which is {-2,2,0}
There was also a structure which changes temperatur (cold+heat){-1,1,0}

Then there were unelemental nes which used C:
Time{0,0,3}
Movement{0,0,5}
Mind{1,0,4}
etc

so this way youcan create time travel (time+movement) and others.


Then i went on and explained why some spell casters brew potions or use wands (i explained how wands work)

Wands:
a wand is a aterial charge with excess V''s
So that when you wave it, some of the V''s getreleased.
There was more but that was the basic idea.

Next i explained the effects f different amount of V''s (life, force, etc)
Then i explained Psych, what it does and so on

And at the end i had a step by step guide to casting a spell.
Finally i had a refference for quick access to some of the formulas in the text.

Heres my description of magic in the text:
Magic s the artificial recreation/creation of energy elements or structures by directly rearanging energy particles
while externallizng internal particles.

Well, its something like that, i cant remember exacty.



Anyway, im still working on it and im working on an algoritm into which you feed the structure and psych etc and it casts the spell...

It is about 99% origional, 1% of it was borrowed from various places.





So, what do you think of my ideas? Would that work well or is it a bit.... ummm, i dunno.

Anyway, good luck!

Share this post


Link to post
Share on other sites
TeraByte    122
ok, i made some mistakes but i guess its still understandable.
i wrote 20 degrees at one point(i meant 200 degrees)
also the structures of particles didnt show up right, there are meant to be more spaces in them


A:
_*_*
*_*
_*
B:
_____
*_*_*
_*_*
C:
_*_*_
*_*_*
_*_*_

V:
*_*
_*


Just take out the _''s

Share this post


Link to post
Share on other sites
quote:

it is impossible to tell the difference between magic and a sufficiently advanced technology


Arthur C. Clarke said that.

Anyway, I too have thought about an algorithmic spell system. Basically, I''m really disappointed with spells as they have been in games so far, because you''re just given spells to use. You should be able to develop your own, to use spells no one else has, spells no one else has thought of. Since spell-casting is supposed to be a gift of the intelligent, intelligence should be more important for spell-casting.

So, it makes sense to program your own spells. The way I see it, you''d have a number of components, as others have said. For casting one type of fireball, you might do this:

#1 create fire on magic at casting_hand
#2 apply force on #1 direction (0,0,1)
#3 cast

Here is an explanation of each step:
#1: Fire must have something to burn, be it wood or coal or whatever. For a fireball, we just use magic to sustain the fire, so we cast it on "magic". We also need a location, so we cast it right at the hand doing the casting. To cast it anywhere else would require either another component (''distance'' or something) or just a skill that''s improved as you level up. Otherwise you could make things happen halfway across the map even at level 1. The damage the fire does would depend on how many points the caster put into ''fire''.

#2: We apply force on the fire to move it forwards (vector 0,0,1). Its actual speed would depend on how many points the caster put in ''force''. Gravity would still affect it though, as would wind if your game has it, so you''d have to aim upwards like throwing a ball.

#3: We now cast the spell. Basically, nothing really happens until the finished spell is cast, so if you get interrupted, you won''t have a fireball lying near your feet or whatever because step #1 was done but not step #2. For very long spells, this would be important.

Another version of the fireball might be this:

#1 create fire on magic at casting_hand
#2 set force on #1 direction (0,0,1)
#3 cast

This attempts to make the fireball go forwards and only forwards - not falling due to gravity or whatever. If you don''t have many points in ''force'', it may just resist gravity partly, and will also move forwards more slowly than the first fireball since some force is needed to resist gravity.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
HellRiZZer    308
I think you''ve given another useful idea, CGameProgrammer..
But I do not think that if you create fireball, then you NEED to burn something down. You can simply heat up the water or burn a hole in a wood/stone( : ) )

Ok, so another law we going to use is vector in 3D, etc speed, acceleration.
I was thinking of the same thing as u did about initial location of object. Yes, we can use that. So, each object will have its initial location.
Next thing is that we can "put" energy or force to an object (as speed/accel) as a vector.
Ok, thats all basic laws that exist in real world. We can apply them, but we need something dissimilar to it, e.g some rules that aren''t the same as in real world...
Don''t know how to say, it, but give some crazy ideas about True Magic..
Cheers!

" Do we need us? "


Ionware Productions - Games and Game Tools Development

Share this post


Link to post
Share on other sites
Tacit    122
Actually, the quote is:

"Any sufficiently advanced technology is indistinguishable from magic."

Clarke''s Third Law, from Profiles of the Future (1962)

In this sense, I believe (I might be wrong here; feel free to correct me) it was stated in the context of humanity discovering a race with technology much more advanced than our own. To us, their technology might seem like magic (unexplainable by what we know of science) -- like angels, or ghosts, or aliens!

Seems like semantics, but that''s not the same as what you said.

R.

Share this post


Link to post
Share on other sites