Search Unity

Spells and SpellCraft

Discussion in 'Game Design' started by Sciwiz12, Oct 9, 2015.

  1. Sciwiz12

    Sciwiz12

    Joined:
    Sep 25, 2014
    Posts:
    32
    Hello, my name is Ricardo and I am a game design student at FullSail university. I'm currently working on a game in which I'm attempting to implement a dynamic spell system that will allow players to experiment with spells on the fly. My first thought was to implement a finite state machine such that pressing shift would allow players to enter a concentration mode causing the wasd keys to act as spell form control inputs (for example hold shift to concentrate, w to form a cone, click to cast). Then by holding shift and space the wasd keys would function as elemental control keys (w as lightning, w and f for plasma, etc...) and I was quite pleased with this arrangement initially as it promises the aesthetic of experimentation in a dynamic fashion.

    Here's my trouble, the initial concentration turning wasd into form control inputs wasn't very intuitive, so I thought to change them to force and intensity scales, but apart from being vaguely defined concepts and thusly also unintuitive it also risked too much overlap with elements. (For instance high intensity risks being too much like fire).

    So now I'm trying to think of some system that will allow players to intuitively shape spells (for instance deciding they want a cone of fire vs a fire ball, or a shield, etc...).
     
    Gigiwoo likes this.
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    That's a hard problem. But let's brainstorm!

    Assuming WASD are normally used for movement, we want to assign meanings that somehow relate to the directions they already represent in the player's mind (if possible).

    So: W is forward, so pressing W in spell mode should make the spell go further forward (in range or shape, e.g a beam). S (back) should hold it back, either reducing the range or changing to a shape like a ball that doesn't extend as far. What to do with the side inputs? I guess these should form medium-range shapes, biased towards the left and right. So A (left) would get you a cone that points to the left of where you're facing, and D would get you a cone that points to the right. (Who says spells have to go off straight ahead?)

    Then be sure to do sensible things with combo inputs. A+W should give you a narrower cone that maybe covers straight ahead and slightly left; similar with D+W to the right. A+S should give you maybe a left-biased oval-shaped area of effect?

    If you're certain the controls will always be keyboard, you could even have combos for W+S and A+D, but if there's a chance the player may be using a gamepad, then you shouldn't do that of course.

    OK, that's shape... I think it'll be intuitive enough if you follow a system like this, where it relates to directions.

    Now, what about element? That's harder. Can you prep element(s) ahead of time, through a menu system? Sort of like selecting weapons and armor for a fighter character? But this is less intuitive and dynamic, I know. Doesn't really encourage experimentation.

    Too bad this isn't a mobile game — I have all sorts of great ideas for doing this sort of thing by drawing glyphs! But let's stick to relatively simple keyboard inputs.

    Since you have a keyboard, have you considered making the user type actual letters? You could come up with a grammar that maps letters to effects, or parts of effects (elements, shape, range, etc.). A simple spell might be a single letter. A more typical combat spell should be 2 or 3 letters. Some crazy demon-summoning thing should take a dozen letters, and if you screw up and make a typo in the middle, the effect is likely to kill you. ;) Letters could be mapped to gestures and utterances and glowy effects around your avatar on screen, so while you're typing, your avatar is clearly engaged in arcane arts.

    I would really enjoy that sort of game, but then, I'm a programmer... I don't know if normal people would enjoy it at all.

    One way to make it more accessible would be to let the player define macros. So you can experiment freely by typing stuff on the fly, but you can also set up macros bound to specific trigger keys that execute a whole string of letters in one go, with no opportunity for error (but also no opportunity to change your mind and finish the spell differently halfway through!). You could wrap these macros in the game fiction as scrolls, or magic items, or whatever. So now skill in the game isn't linked to your ability to type, but you still get to explore and create your own spells. Be sure to have some safe area (with target dummies!) to engage in such experimentation.

    Dang, I want to play this game now! :D
     
  3. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    @Sciwiz12 What is the player doing with the spells? I assume the spells are in a broader context (ie combat). This is where a complex system like this gets into trouble, as the player is now using a lot of processing power, and tedious steps to create one behavior. This was a problem in Magicka, where in the end, I only use Fire+Fire or whatever simple things I can press QUICKLY. The speed of the combat was in direct opposition to the complexity of the spell system. It's an anti-pattern. Yes, it worked moderately well in Magicka, though I think the game suffered for it overall.

    TL;DR - Decide what hte player is DOING with teh spells, then work backwards from there. This is also why we don't invent tech before we have a basic game concept.

    Gigi
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    On the other hand if you slow combat right down, a system like this could shine. Make combat more about figuring out the right spell combinations to use to outwit your enemy. More of a puzzle challenge then a reflex challenge.

    Or if your enemy consists mostly of static puzzle-like environments.
     
    KWaldt and Ryiah like this.
  5. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Maybe you could have like something like this.

    #F10I30 #1
    Fire 10 ice bullets, in a radius of 30 degrees (letter number, letter number) assign to macro key#1. So if you press 1 hes uses that spell (if you got enough mana or whatever).
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yep... might be perfect for a turn-based Roguelike (aka "the thinking man's RPG").
     
    Ryiah and Kiwasi like this.
  7. Sciwiz12

    Sciwiz12

    Joined:
    Sep 25, 2014
    Posts:
    32
    Actually I should have specified sooner, this particular system is more for direct combat and some traversal/puzzle solving/environment manipulation effects, but mostly combat. I intended to complement this system with a rune system for staves and wands etc... so that you can quickly access your most commonly used spells. My hope is that the player will initially rely on quick and easy spells and as the player progresses acquiring minions and protection the player will, for example, rely on his or her golem as a distraction while weaving more complex spells with more powerful effects.

    I hadn't thought to have the player type out words or phrases although it's something to consider with spell books and scrolls, I'll have to think on it more deeply. As far as shapes I had the same thought initially, and I too got as far as forward = elongation while backward = contraction when I concluded that left and right biases don't mesh well with such a system and doesn't easily lend itself to intuitive design. I would be remiss to abandon the wasd keys for this function as they are both easy to reach and few in number such the players only have to think about combinations of four keys rather than 10 as with number keys.

    Elements are pretty straight forward, I initially was going to use w for fire since it feels like a primary key but I decided to go with a thunder from the heavens motif since my base elements are lightning, earth, heat, and cold technically. Lightning is w, heat or fire is d, cold or ice is a, earth is s. Fire and lightning is plasma, fire and earth is magma, fire and cold cancel, earth and lightning cancel, you get the picture.

    I won't detail all of the features I'm considering for now because I can already feel the cold chill of feature creep flowing through me, but my primary concern for now is to figure out this initial concentration mode on a conceptual level. I suppose it's possible that since lightning is mapped to w I could continue the pattern and have w in base concentration mode function as sort of a lifting or levitating input. Then s could oppose w by acting as sort of a weight or gravity input. This frees up forward and backward for d and a, while it's not as intuitive as I'd like it to be at least for native english speakers who read left to right it makes a sort of intuitive sense for d to control a forward directional force like stretching the magic into beams or spikes etc...

    I think I'm going to go this way for now until I hear something I like better.
     
    Ryiah and JoeStrout like this.
  8. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Don't make the keybindings the main concern. If w is fire or d is fire is largely irrelevant. There may be differences in how people relate to those keypresses, but the biggest problem with the relationship is that most people are accustomed to using them for movement.

    The modern convention is that WASD is a movement scheme if the game uses the mouse for non movement. If the user uses the mouse for movement then QWER is generally used for ability selection.

    As mentioned above the real trick is to figure out how these things are different in practice: what is Magma compared to Plasma? How do they differ? Are they just two different colored beams?

    There's a lot of work to making this kind of system feel like more than a very superficial gimmick, if you get hung up on the keybindings - you'll never get to the point where you're working on the real meat. If you haven't tried it - then you absolutely must do some research into magicka since this is the best example of these systems.
     
    Kiwasi likes this.
  9. Sciwiz12

    Sciwiz12

    Joined:
    Sep 25, 2014
    Posts:
    32
    Please don't misunderstand, wasd is for movement, that's why I'm giving it extra functionality. Some spells will be essentially quick slotted to staves and wands but for the rest the player has to weave the spell, so when the player presses and holds the shift key they enter a different mode which temporarily changes the functionality of the wasd keys. The functionality reverts to movement keys if the player releases concentration which in turn results in spell failure, this way I can confront the player with the choice between taking the time to weave a more powerful spell while remaining relatively rooted during the casting process or retain movement but rely on the weaker slotted spells.

    As far as the elements I'm working on that script right now as it isn't as challenging conceptually.
     
  10. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    To ease some of the complexity raised by gigiwoo, if the game is single player have the combat slow down when the player enters concentration mode. As they level up & have more complex spells/combinations boost the power of the concentration I.e. At the beginning when controls are simple battle only slows a,little but near the end when things are complex time slows to a crawl.

    For controls, if the player character faces the mouse cursor then I'd go for w for the beam/narrow, d for the ball effect, a&s to do the cone effect (s to make it wider, a to narrow it so the player has fine control). All spells are cast in the direction of the cursor (for target/ ground/explosive then the mouse cursor is where it will hit & then react) with left mouse click to release the spell.
     
  11. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    There are some larger design issues with this system too. What do you have in place to inspire me as a player to uses come instead of a ball? And so forth. Explaining the larger design issues may help us zoom in on what input scheme is better.
     
  12. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    As a general rule - modal input does tend to be a bit more confusing for users. Modal input - is 'entering a mode and having the keys change'. In the 80s there was a huge movement called "no modes" driven by Larry Tesler to stop applications from using modal input schemes.

    In games, they're often much more excusable - but it's something to always keep an eye on.

    Entering "casting mode" that reworks the standard keybindings (and requires quick press in sequence instead of long press and hold) may be a little jarring. I would probably want to use a different set of keys after entering spell mode.

    It's like WASD is going to be connected by instinct to movement, then you hit space to enter spell mode, you probably don't want their hands to go back to the movement keys, you want them to position differently - this will also underline the idea that they're doing something entirely different.

    Maybe not a show stopper or anything - but definitely something you want to test/prototype fast.
     
    Kiwasi likes this.
  13. Sciwiz12

    Sciwiz12

    Joined:
    Sep 25, 2014
    Posts:
    32
    @frosted and bored mormon: Yes, obviously I need testing, and I wouldn't use modal casting if I had a better idea, do you have a better suggestion? If not then why bother mentioning the pitfalls of my current model? And yes bored mormon, obviously different choices should have tradeoffs, the first thing you learn in game design school does apply to the real world, thanks for that helpful bit of advice. Why does that matter? Giving each shape various costs and benefits doesn't tell me how to map them so why is that important to the problem I'm facing currently?

    I hate to be rude you guys but the point I'm making here is that I can walk outside and accidentally trip over critiques, they're everywhere and I haven't implemented yet so I can't test the things that need testing or refine what needs refining. I like the idea of time slowing that ted had, it's not particularly relevant to my initial dilemma but at least it's an idea that I can play around with and see how it fits. I don't mind critiques but you're way to early, let me figure out how I want to complete my designs and implement them and then you can critique the fleshed out prototype all day long.
     
  14. Sciwiz12

    Sciwiz12

    Joined:
    Sep 25, 2014
    Posts:
    32
    Sorry, I really don't mean to be rude, it's just unnaturally irritating to get the criticism before the designs are even complete, especially obvious criticisms.
     
  15. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    My bad dude, I don't mean to be overly critical - sometimes the way I phrase things tends to be too harsh or negative.

    Just test it out - if in practice people like WASD as their spell weaving as well as movement - then great. I'd just make sure that when you're play testing, you pay some extra attention to modal control schemes.

    Don't worry too much about this decision itself - just make sure that it's easy to change later (perhaps a keybinding config file or something).
     
  16. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You are going to have to develop a thicker skin to hang out here. Nobody was trying to be offensive. Just assume every post is intended to help you and the poster is a basement coder with no social niceties.

    Anyway my question still remains and is relevant. What's the larger context for this spell system?

    Are we dealing with FPS based combat where the player will also need to concentrate on aim? Are we dealing with a Diablo like RPG where combat is point and click? Speaking of which, what is happening with the mouse during combat, it's to important of a device to ignore. Or do we have JRPG turn based combat? Or is this a 2D platformer, top down shooter or something else?

    I understand these are out of scope for discussion in this thread, but they are important for context.

    The main alternative input scheme I would consider would be a bunch of mouse based UI sliders. Allow the user to set presets for each spell on the number buttons. This separates the experimentation from the actual combat, and may encourage more exploration and experimentation.

    There is always gesture control too. But so far no one has made it work, so I wouldn't touch it.
     
    Martin_H likes this.
  17. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    For the prototype map wasd & another key combination as suggested by frosted & then with your testers tell one group it is wasd & the other group that it is the other key mapping & then ask for feedback from both. Was using wasd for movement & spells counterintuitive/confusing or was it easy to use? Was using wasd for movement & different keys for spells confusing or easier to remember?

    I like the idea of designing presets & mapping them to hotkeys so the player hits space for concentrate mode & then a set key to cast, but limit it to maybe 2-4 spells (less than what you consider the ideal # of spells for effective combat) & allow that to be something that is unlocked & linked into the foci as they progress.

    As mentioned above, the type of game (fps, top down, turn based etc) & the rest of the controls like mouse are needed if you want better input. It's really hard for us to make suggestions without knowing the details as we are guessing at a lot of the major elements which is probably why you are getting input based in the form of questions about your design.

    Ps. I'm studying game design as well & the comments in this forum so far are almost identical to what we get from our teachers when we pitch. We have to show that we have a legitimate reason for what we are putting into the design. Our last game pitch for an assignment was shredded & we were told the game didn't sound fun, had nothing enjoyable in it etc even though we had spent ages working out the world, the gameplay, the controls etc. We were told to scrap it & start again so just had to go back to the drawing board, redesign it & make sure that we didn't get caught up in the enthusiasm & could actually justify every design decision & how it all fitted together.
     
    Last edited: Oct 11, 2015
  18. Sciwiz12

    Sciwiz12

    Joined:
    Sep 25, 2014
    Posts:
    32
    You're right, I just haven't been getting a lot of sleep lately and on top of that I missed taking my ADD meds so I was feeling anxious when I typed that, I'm sorry. Here's the larger context: I set out to make a game that would pull elements from Magicka, Lichdom, and reject the point and click insta cast magic of your typical fantasy rpg. I originally wanted one control scheme for all magic, which split into two to incorporate alchemy, which since split into a couple more.

    The magic system I'm referring to here is primarily the combat system with targeting performed either by selecting a target at casting time with the mouse button or by directly handing the controls and camera to, for instance, a golem or a fire spell, an walking the spell around toward or through enemies. I like the idea of designing spells in advance and assigning them to hot keys. My primary thought was to have a continuum of spell complexities ranging from single inputs to more complex combinations of the four inputs to produce spells with not only more power but also more stylistic appeal such as changing the sky box temporarily and instantiating demons for example.

    The idea is that a spellcaster's concentration must be maintained in order to cast a spell and that the concentration has a proc chance based on the spell complexity, damage taken, and possibly a range of other factors of failing at which point some spells will fly out of control possibly harming the caster while others will simply fizzle out.

    It's possible that I could have a special work station for crafting spells that will be slotted to keys and then give the player a range of options for how those spells will combine with one another. Maybe have some pre-made spells to start with. I would like a designer spell system which is what I wanted originally but I keep getting stuck when it comes to thinking of intuitive ways for spells to combine.

    The difficulty I'm having comes from the vague and abstract nature of a "spell", it's hard for me to think of how the pieces should fit together to form a whole.
     
  19. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    If it's real time then personally I won't balance my time between complex key usage & play, I will find the simplest effect/ease combo & just spam that.

    I have had a similar idea but based on what I prefer to play I could only come up with complex craftable spells as being fun to me, & encouraging me to use them, if they could all be done pre battle sort of like the alchemy or spell tables in skyrim & then be single button usage.
     
  20. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    I really like that idea. Imagine this you got lots of enemies -- lets say robots and they are coming at you, your standing in a pool of water.

    And lets say the robots are really weak against lightning -- so you have to do the lightning spell in an arc (but you dont want to just do a 360 degree -- but rather multiple arcs -- because thats going to wastes alot of mana and will set you poorly for the next set of enemies). Now your standing in water so if you use the lightning spell it will get electrocuted, so you have to cast a wind spell on your self to raise your self above the water (and like you got 30 seconds to enter your commands).
     
  21. Sciwiz12

    Sciwiz12

    Joined:
    Sep 25, 2014
    Posts:
    32
    So then it sounds like the best approach is probably going to be a way to combine spells in the streets and a way to craft spells in the sheets. In some ways that sets me back a bit when it comes to conceptualizing development but I like that this system has the potential to put the power in the hands of the player to design his or her own spells and then implement then experimentally implement them together such that I don't have to worry about which keys make more sense thematically because that will be up to the player in some sense to assign his or her own meaning to the orientation of his or her spells.
     
    JoeStrout and tedthebug like this.
  22. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    That also lets the player feel they have more control over the development of their character as well if they can all mix & match spell effects for different outcomes I.e. Not all fireballs will be exactly the same etc
     
  23. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Yeah I think so otherwise what would end up happening is you'll make your spells once and just use them and the whole dynamic spell thing becomes superficial, but if there is a reason or the battle system to be constantly having to change up spells on the fly then you really have something, well maybe.
     
  24. Dennis_eA

    Dennis_eA

    Joined:
    Jan 17, 2011
    Posts:
    380
    Drawing shapes on the screen via mouse input would be most intuitive.
    Pressing shift = spell mode (else mouse = look around)
    Then drawing a U on screen would mean something which surround the enemy
    a Z would mean something like "erase/attack"
    possibilities would be endless, input would be intuitive and more like .. well, holding a magic wand, not just a keyboard :rolleyes:
     
  25. Xavy_clay

    Xavy_clay

    Joined:
    Oct 2, 2015
    Posts:
    20
    What kind of action game are you making? Single player or multiplayer?

    If its single player, you could do something like a "slow motion" or "bullet time" when concentrating, then giving the player a few seconds to chain the elements, then hit the "shoot" button or lose the energy gathered.
    In adition, you could make the result vary depending on the time each button is pressed and the moment it was pressed: FIRE por one seg + shot could be a quick fireball, while LIGHTING for two second maybe a short-range electric pulse; FIRE for three seconds + EARTH one second + shoot could create a trail of magma in front of you.

    I can picture the scene with a nice camera orbit around the wizard with particle effects that grows on each button down :)
     
  26. BornGodsGame

    BornGodsGame

    Joined:
    Jun 28, 2014
    Posts:
    587
    You could also do something with UI where an auto-filling bar gives a difference in spells.

    Just to use fireball vs cone of fire.

    You press the fire-spell key and it initiates the cast, a bar begins to fill up and the fuller it gets, the less dense the spell is.. so a quick cast would be a tight fireball, and letting the bar fill up would change it to a cone of fire.
     
  27. Marrt

    Marrt

    Joined:
    Feb 7, 2012
    Posts:
    613
    Didn't read all but check out the Merlin Gameplay in Gauntlet:


    - 3 elements to put in queue: Fire(RMB) lightning(space) and ice(shift)
    - put 2 elements into queue to change the current active spell
    - yields 9 spells
     
  28. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
  29. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I know I'm way late to the party but that sounds frustrating more than anything. A bunch of factors that are out of control of the player that turn an action with positive intended outcome into a negative one? I wouldn't like that at all as a player. What makes the "dangerous" magic system in the first (I only know the first) Magicka work imho, is that if you hurt yourself it was because of something that you did. You could cast fire onto yourself to set yourself on fire but if you did that you basically had pressed "cast fire on self" instead of "cast shield on self" for example. I see how that can add to the fun and the feeling of magic being powerful and hard to control. If that's your goal I would cut out the randomness and make it so that with skill the negative outcome of casting a spell can be prevented and a sense of mastery of magic is acquired over time. Unless it is a turn based game that focuses on RPG-like character stats to drive the outcome of actions I'd cut out the randomness in spells entirely. There are plenty of mechanics that can be used to increase complexity. Timing is a great one because that is one that people often screw up under stress. There was a reload mechanic in the first Gears of War if I remember correctly, where you could do the standard reload that every shooter had, but if you pressed the button again at the right moment shortly after you started the animation you'd get that "epic reload" that was quicker. You can have an optimal timing and then scale damage or AOE range with how close the player came to the optimal timing for example. And if he is too far off maybe the spell hits the wrong area or something like that.
    Just my 2 cents. Have fun working on your project and let us know how it's going.