Chapter 4Magic

Anytime you talk about a fantasy-based RPG, you will eventually get around to talking about magic. A fantasy-based RPG wouldn’t be the same without the obligatory wizard or mage. An RPG world would probably be pretty boring without its magic. You wouldn’t have any of the magical creatures, and some of the races wouldn’t exist, such as elves, dwarves, or halflings (depending on how you explain their existence). All in all, it might not be much fun to run around in such a world. Luckily for you, this chapter will give you some ideas on how to integrate a basic magic system into your game.

There are many ways to implement a magic system. We’ll use a fairly standard mana system. Mana usually exists in one of two ways — entities have ...

Get RPG Programming with XNA Game Studio 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.