Published on February 3, 2020
Categories: computing, dnd and python
Debuggery

Some fields hidden!

{'html': '

My first hobbyist programming project was to enhance my D&D game with a system for determining the prices of in-game items. To reach this goal, I built up a pipeline of tools which generated terrain with elevation, moisture, temperature, and climate; used pathfinding to construct a road network; rendered the world map as a vector-graphics file; and specified "recipes," like this one, delineating the raw materials and labor needed to construct each purchasable trade good1.

\n

Pouring thousands of hours into a sprawling project over two years solidified my love of programming, expanded my brain, and got me seriously writing on the Web for the second time2. However, as the work of a beginning developer, "the economy project" is sloppy.

\n

Today, I embarked on the grand adventure of converting this project into a proper (web) application. It\'s hard to explain all the work which will be required, but I can see the end result in mind. Here are some of the changes I\'ll make:

\n
    \n
  • The original project could only be run on my computer. The new version will be accessible on the Web.
  • \n
  • The original project was only able to output its final product (the trade-goods pricing tables). The new one will provide more of the game-world information it uses internally, including that pertaining to towns, roads, and terrain.
  • \n
  • The original project required me to change a parameter in the source code to output prices at a different city. The new one will allow one to simply enter a different town name in a dropdown list, and may also permit comparison between prices at multiple cities3.
  • \n
  • The original project didn\'t cache the prices of intermediate goods which fed into many recipes\' final price. The new one will use caching wherever possible.
  • \n
  • The original project ran every layer of code (terrain, pathfinding, import/export, pricing, recipe evaluation) each time the main program was executed. The new one will use a database to reuse each player\'s results, only re-running a given layer when its source code has changed.
  • \n
\n
\n
    \n
  1. More details can be found on my old blog, 21st Century D&D. One day I\'ll port those blog entries and the game rules over here, for archival purposes, for rewriting into better game material, and so I can finally redirect that domain.

  2. \n
  3. The first time was a blog I wrote while studying abroad. The third and final time is this website.

  4. \n
  5. As the app evolved toward a full-fledged game platform, with players logging in to make characters, it could be arranged so that only characters with sufficient mercantile knowledge would be able to view this screen.

  6. \n
\n
\n'}

Maxwell Joslyn's Test Website

GitHub, Email