Press "Enter" to skip to content

Learn C# by Building a Simple RPG – Plan the Program

Plan the program


Update 15 May 2014: The latest lessons are available at Learn C# by Building a Simple RPG Index


Before we start writing the program, we need to spend a little time thinking about what we want it to do.

If you start programming at a large company, they may have business analysts spend weeks doing this type of work. But for our game, we’re going to do a scaled-down version.

What we need to create is a list of the objects and procedures we want in the program. It doesn’t need to be very detailed, just enough for us to see if we’re missing anything. We can also use this as a checklist to let us know when we’re done.

Objects/classes in the game

Here are the types of objects the game will need:

  • Player
  • Weapons
  • Healing potions
  • Poisons
  • Monsters
  • Pets (to help us in battle)
  • Locations
  • Quests
  • Skills (for crafting)
  • Recipes (for crafting)
  • Miscellaneous items (for crafting and selling)

We’ll create some additional types of objects, once we start building the program, but this gives a good place to start.

Procedures in the game

Here are the actions we’ll want to perform in the game:

  • Move to a new location
    • Be blocked from moving there, if:
      • Not high enough level
      • Not carrying a required item
  • See what is in the location
  • Fight monsters that are in the location (if any)
  • Collect items that exist in the location
  • Receive any quests that are given at that location
  • Buy items at a store
  • Sell items at a store
  • Fight monsters
    • Attack with a weapon
    • Use a healing potion in battle
    • Use a poison in battle
    • Have pet heal player
    • Have pet attack monsters in battle
    • Flee from battle
    • Receive loot from defeated monsters
  • Receive a quest
  • Complete a quest
    • Turn in, when we have required items
    • Receive rewards for completing the quest
      • Experience
      • Gold
      • Item(s)
      • Skill
      • Pet
      • Recipe

That’s enough to get us started on the program. We’ll get more detailed when we need to.

Now it’s time to install Visual Studio, so you can start writing the program.

    Leave a Reply

    Your email address will not be published. Required fields are marked *