Welcome to another World of Warcraft add-on spotlight! Today we're covering Routes, by Xinhuan and grum.
The Addon

Ever wondered which was the most efficient path for gathering herbs or ores from a given region? Then Routes is just the add-on for you! It generates an optimal route for gathering all the resources you need, in the shortest amount of time.
It works for all the existing resources in the game - including treasure chests, fish schools and gas clouds - and is highly configurable. For instance, it allows you to:
- Select exactly which types of node to track (heartblossom, elementium,...)
- Define "taboo areas" (sections you wish to avoid)
Additionally, it cooperates with a great variety of addons, such as TomTom or SexyMap. An exceptional tool for all your gathering needs, wether you want to level a profession, or just rake in a little extra currency.
Installation
Routes does not come with a database of existing nodes right out of the box. As such, it is necessary to install one separately. Fortunately, Routes supports a wide range of databases. We will be covering how to use GatherMate2 for that purpose, as it is the one recommended by the developer:
1) Start by installing the following addons:
.



Usage
Sadly, Routes is also not a trivial addon to use. But have no fear! Following these steps will get you quickly started!





We also had the oportunity to have a chat with Xinhuam, one of the add-on's authors:
How did you start to work on this add-on together?
Grum initially started the add-on by having the idea that a pre-calculated efficient farming route could be drawn and displayed on the World Map. When he was showing the prototype of his work on the WoWAce IRC channel, it caught my eye and I one-upped the idea - why have pre-calculated routes (because it is time consuming, even outside of WoW) when we can calculate a fairly optimal one in-game as you gather nodes?
So I made a prototype of taking a list of nodes and performing "ant-colony traveling salesman optimization" on it, took my routes generation and connected it to his line-drawing code. And the result is Routes.
Your add-on dates back to 2008. How would you describe the experience of working on this project for the past 4 years?
Working together on this project has been interesting, and fun. Because generating routes is a exponentially time consuming problem, it was a problem trying to keep it time down by using a number of Lua optimization tips and tricks (which itself caused the code to be much less readable). We usually worked on different portions of the code so there were little to no conflicts.
Which were the biggest challenges you faced during development?
One of the challenges was that we initially used ckknight's Rock framework as the addon's base an it was initially only usable with Cartographer. Due to the lack of support as ckknight had join Curse then and was busy, and also growing requests to also support non-Cartographer users, we eventually ported the addon to use Ace3.
Do you have other mods planned for the future?
We currently do not have any plans or progress planned for the future. Grum is busy with is work, as well as coding part-time for Mojang in the Bukkit Team (with thanks to Curse for hooking the Bukkit Team up at last Blizzcon 2011, me and Grum were both there at the Curse Party and WoWI dinner!). I am busy in my full-time job as well.
Do you have any advice for others who would like to start modding?
Advice for new modders? Read Programming in Lua (version 1 is free). Read the mountain of source code available in existing addons to see how different people code, and what techniques they use. Refer back to Programming in Lua, WoWProgramming and WoWAce/Curseforge for the places that you do not understand why a certain piece of code is written the way it is written, And, must of all, keep trying.
One common mistake a lot of programmers tend to make is not making sufficient use of print() statements to debug their addon. Add print() statements everywhere to print the contents of variables! It is in fact the only way to debug an addon because you cannot set a breakpoint in WoW.
Thanks to Xinhuan for participating in this interview and both developers for bringing Routes to the community.
Comments
is a great addon! Please update to use in MoP