CityGenerator / Megacosm-Generator

A tool for creating fantasy campaign settings, including maps, regions, flags, cities, NPCs, businesses, legends, lore and more.
GNU General Public License v2.0
70 stars 31 forks source link

Flag Generator #38

Closed morgajel closed 10 years ago

morgajel commented 10 years ago

My goal is to eventually get back to the multi-flag view that citygenerator had:

http://citygenerator.morgajel.net/multiflaggenerator

Unlike most generators, this one had a large JS section that can more or less be ported directly over. It's the json connection that is the problem.

The only problem is the json data being passed to JS was based on a perl data structure that isn't easily replicable in Python. This gives us three options:

  1. Bend over backwards to implement the perl data structure with no changes to the JS.
  2. Rewrite the JS to fit with the current python data being returned.
  3. Meet somewhere in the middle

I had begun the work in the flag branch ( https://github.com/CityGenerator/Megacosm-Generator/tree/feature/flags ) but quickly grew tired as I realized how messy the code was and how much I worked around what perl was sending me.

In addition, the data structure on the backend greatly changed between CityGenerator and Megacosm Generator with the xml-> data file conversion. I no longer have the simplicity of nested data structures to represent different patterns.

This whole thing should potentially be gutted and recreated :)

morgajel commented 10 years ago

I was able to rework a good deal of this, however there's still plenty of room for improvement. Borders are still missing, as are asterisk and jacks. The template page currently does not show the seed, either.