Creating other spells
By playing around with particle systems, you can create a variety of different spells that do different effects.
The fire spell
You can easily create a fire variant of our blizzard spell by changing the color of the particle system to red:
Exercises
Try the following exercises:
- Lightning spell: Create a lightning spell by using the beam particle. Follow Zak's tutorial for an example of how beams are created and shot in a direction, at https://www.youtube.com/watch?v=ywd3lFOuMV8&list=PLZlv_N0_O1gYDLyB3LVfjYIcbBe8NqR8t&index=7.
- Forcefield spell: A forcefield will deflect attacks. It is essential for any player. Suggested implementation: Derive a subclass of
ASpell
calledASpellForceField
. Add a bounding sphere to the class, and use that in theASpellForceField::Tick()
function to push the monsters out.
What's next? I would highly recommend that you expand on our little game here. Here are some ideas for expansion:
- Create...