SLADE icon indicating copy to clipboard operation
SLADE copied to clipboard

Program Database & Archive Library

Open sirjuddington opened this issue 11 months ago • 0 comments

This (WIP) branch/pr adds a SLADE program database for storing various data, info and settings that don't really belong in user-editable text files.

A basic overview of what is saved to the database (so far):

  • Info about each Archive opened
    • Entries (type, hash, etc.)
    • Maps
  • UI state
    • Window layouts and sizes (instead of in .layout files and slade3.cfg)
    • Entry list configuration (per-archive)
  • Run dialog settings (per-archive)
  • Map editor configuration (port, game etc.) (per-archive)
  • Bookmarked entries

This also adds an archive library UI which lists all previously opened archives and allows opening or running them directly

I'm not 100% sure about going ahead with merging this for 3.3.0 since there is potential to introduce a whole new class of bugs :P However there are also many big improvements it could lead to such as simplifying and extending the undo/redo system, or potentially even recovering data after a crash.

Planned/potential additions:

  • Save basic map data to make loading map previews faster (especially for UDMF maps)
    • Potentially could expand this to full map data, again to improve opening time of UDMF maps in the map editor
  • Save parsed zscript, especially from (g)zdoom.pk3 which shouldn't change often, currently it's re-parsed every time
  • Replace Undo/Redo system with something simpler (eg. full data backups) since we wouldn't have to worry so much about memory usage
  • Store archive data for the session so it can be restored in case of a crash (possibly could just be implemented as a side effect of the above)

sirjuddington avatar Jul 04 '23 13:07 sirjuddington