Problem: The first time you browse notes, it has to scan all 13,496 files, which is very slow. This makes the initial user experience poor. Solution: Pre-warm the vault file cache in the background: 1. When Obsidian connection is tested (first-time setup) 2. When FMG loads and Obsidian is already enabled (page reload) Implementation: - Add prewarmCache() function that scans vault in background - Call it from testConnection() (don't await - runs async) - Call it from init() if config.enabled is true - Scan happens silently in the background - By the time user clicks Browse, cache is already loaded Benefits: - First browse is instant (cache already loaded) - Works on every page reload - Non-blocking (doesn't slow down FMG startup) - Silent/automatic (no user interaction needed) User experience: - First time: Test connection → cache warms in background → browse is instant - Subsequent loads: Page loads → cache warms → browse is instant - Cache lasts 5 minutes, so multiple browses within that window are all instant EOF ) |
||
|---|---|---|
| .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