Problem: With hundreds/thousands of burgs and markers, building the FMG ID index one-by-one as you click each element is too slow. Users need instant lookups at scale. Solution: Build the complete index upfront on startup by reading ALL notes' frontmatter during the pre-warm phase. How it works: 1. On startup/connection test: Pre-warm cache runs 2. After scanning file list: buildCompleteIndex() runs 3. Reads frontmatter from ALL 13k+ files 4. Extracts fmg-id from each note 5. Builds complete fmg-id → path mapping 6. Saves to localStorage Benefits: - Day 1: All burgs/markers with notes have instant lookups - No gradual index building needed - Scales to thousands of elements - Index persists across page reloads Performance: - Initial build: One-time cost on startup (background, non-blocking) - All subsequent clicks: Instant O(1) lookup - Manual rebuild: ObsidianBridge.buildCompleteIndex() Console output shows: 'Complete FMG ID index built: X notes indexed, Y skipped' |
||
|---|---|---|
| .docker | ||
| .github | ||
| .vscode | ||
| charges | ||
| components | ||
| config | ||
| heightmaps | ||
| images | ||
| libs | ||
| modules | ||
| styles | ||
| utils | ||
| .gitignore | ||
| CLAUDE.md | ||
| CODE_OF_CONDUCT.md | ||
| Dockerfile | ||
| dropbox.html | ||
| icons.css | ||
| index.css | ||
| index.html | ||
| ISSUE_TEMPLATE.md | ||
| LICENSE | ||
| main.js | ||
| manifest.webmanifest | ||
| OBSIDIAN_INTEGRATION.md | ||
| README.md | ||
| run_php_server.bat | ||
| run_python_server.bat | ||
| run_python_server.sh | ||
| sw.js | ||
| versioning.js | ||
Fantasy Map Generator
Azgaar's Fantasy Map Generator is a free web application that helps fantasy writers, game masters, and cartographers create and edit fantasy maps.
Link: azgaar.github.io/Fantasy-Map-Generator.
Refer to the project wiki for guidance. The current progress is tracked in Trello. Some details are covered in my old blog Fantasy Maps for fun and glory.
Join our Discord server and Reddit community to share your creations, discuss the Generator, suggest ideas and get the most recent updates.
Contact me via email if you have non-public suggestions. For bug reports please use GitHub issues or #fmg-bugs channel on Discord. If you are facing performance issues, please read the tips.
Pull requests are highly welcomed. The codebase is messy and requires re-design. I will appreciate if you start with minor changes. Check out the data model before contributing.
You can support the project on Patreon.
Inspiration:
-
Martin O'Leary's Generating fantasy maps
-
Amit Patel's Polygonal Map Generation for Games
-
Scott Turner's Here Dragons Abound