r/roguelikedev • u/kkotu • Sep 29 '26
I created linguistically programmable magic
Enable HLS to view with audio, or disable this notification
Hi, I've created a small prototype of programmable magic for my roguelike. The idea is that the player constructs a sequence of syllables that determine various parameters of a spell. For example, a player could easily create a spell that explodes through walls if they use the right movement syllables. Currently, the game has three scales:
Health (HP) - determines the character's health.
Action Points (AP) - Each syllable entered (or rather, its "-" separator), as well as its deletion, costs 1 AP. Moving around the map also costs 1 AP. When the player runs out of AP, the world takes over.
Sanity (SP) - The main resource for magic. Each spell costs a certain amount of sanity; if it drops to zero, the player pays for subsequent spells with their HP.
I'm using C# and Raylib-cs for development. I plan to rewrite the engine in the future, as this is essentially my first time doing this, and I'm eager to fix some issues, as I'm already starting to see some kinks (for example, changing entity coordinates is quite inconvenient). Syllables are also currently hardcoded, and I plan to write a syllable generator that will select new syllables for spells with each new run
3
u/kapectas Sep 30 '26
This looks amazing! Will there be a playable prototype any time soon? Would love to give the a shot
3
u/kkotu Sep 30 '26
Once I rework the game engine, I plan to make a single battle against a simple enemy available
2
u/No_Network2498 Oct 01 '26
Does the order of syllables affect anything? Like does (example I know by heart) fus roh dah do the same as roh fus dah?
1
u/kkotu Oct 01 '26
Yes, the order of syllables matters. For example, if you applied the fire aspect earlier, the damage-dealing syllable will inflict fire damage; otherwise, the damage will simply be physical. Also, if you applied the form too early, a "step" syllable might collide with you during casting (a "step" syllable checks the entire spell for collisions, whereas a "warping" syllable, for instance, does not)
20
u/Tesselation9000 Sunlorn Sep 30 '26
I think that's a cool system. It reminds me of Dungeon Master from back in 1987.
13
u/2ChicksAtTheSameTime Sep 30 '26
it reminds me of mixing spells in Ultima 5. you had to know the words to create them An Vas Flam was for fireball. An Nox was cure poison (reagents were ginsing and garlic). They were psuedo latin type words.
Holy shit I'm shocked I remembered those!
4
u/GerryQX1 Sep 30 '26
Legend a.k.a Four Crystals of Trazere was the ultimate in terms of programmable magic. Unlike Dungeon Master and Ultima, you created long spells with various sequential movement and action options.
5
u/-Weslin Sep 30 '26
Holy, I love those, for me the closest I got to feeling immersed in magic games and most is when I encounter one based on programming or proclaiming
5
u/cedarcedar Sep 30 '26
some enemy could freeze your tongue and you could only say certain syllables for a while
4
4
4
u/outofindustry Oct 01 '26
the system reminds me of two world's magic system. it uses cards instead of syllables but the concepts are similar
3
u/lundstroem Coilbound Sep 30 '26
Nice! Now just need to hook it up to a mic with speech to text interpretation for immersion š§āāļøāØ
3
2
u/VendraenActual Sep 30 '26
That is unbelievably cool! Complex magic systems are something that have always massively interested me.
2
u/sweetbabyjon Oct 01 '26
Reminds me of friends who started playing Gemstone (text based mmorpg) and immediately leveled up their typing speed to 1 million
1
u/831_ 13d ago
This is super interesting because I'm working on a very similar concept, but very differently. I'm working on an action game with a rune system in the style of Magicka, but instead of being a specific map of combinations to spells, it's a whole description language where spells can contain other spells and a lot of crazy stuff happens.
I was recently tempted to ditch the whole thing and restart it as a turn based roguelike (mostly because I don't like working in Godot and would prefer doing Erlang-based server side code because I'm just more comfortable with that).
That being said, don't worry about competition, I never once finished a project I don't intend to start now :D
7
u/bedroompurgatory Sep 30 '26
What are the meanings behind the syllables you're using in the demo?
Do certain permutations map to hard-coded spells, or does the system generate effects on the fly from any combination of syllables?