Skip to content

Improved sync#333

Open
kenbot wants to merge 3 commits intonstlaurent:developmentfrom
kenbot:sync-gameid
Open

Improved sync#333
kenbot wants to merge 3 commits intonstlaurent:developmentfrom
kenbot:sync-gameid

Conversation

@kenbot
Copy link
Copy Markdown
Collaborator

@kenbot kenbot commented May 25, 2025

1. IsSyncNeeded feature

  • GameFile now has a boolean IsSyncNeeded field. This allows us to modify how syncing, thumbnail images, etc are generated and ensuring that users will see the new content next time they upgrade DoomLauncher
  • If set, the application will automatically lazily resync files as it displays them in the GUI
  • Works for both tile view & grid view
  • Where there are multiple pages, only resyncs the GameFiles in the displayed page
  • The DB upgrade sets it to 1 for all GameFiles, so as of the next release, users will have all their stuff automatically resynced
  • @nstlaurent btw would you mind letting me know when you plan to cut the next release? I'll make sure to cram as many sync improvements in as possible by then, to minimise the forced resyncing

2. IntendedGame feature

  • GameFile now has an IntendedGame field. This is so we can judge what game the wad is supposed to be played with, even if they don't have that IWAD installed.
  • Drops the IsDoom64 field, which is now represented by IntendedGame = DOOM64
  • IWadInfo has been upgraded into a Java-style enum (ie a real object, not an int), and the database maps the stored string into an IWadInfo. This keeps it typesafe, and makes sure we can't put junk into the string DB field. (I prefer to enforce this in the type system / code rather than SQLite)
  • Drops the unused IWadInfo field HasMetadata
  • Adds IWadInfo field BackupGame which means that Freedoom1 and Freedoom2 will automatically replace Doom1 and Doom2 respectively if they are not present.
  • On sync, it tries a few things to guess the IntendedGame:
    • Looks for the "Game" field in text files and WADINFO
    • Looks for the "IWAD" field in GAMEINFO
    • Looks for the "iwad" field in GAMECONF
    • Last of all, it will set IWadId to the first matching IWad, if any
  • I originally tried to use the existing (but unused) field GameID, but being an INTEGER, wasn't usable for this purpose.
  • If required, MainForm_Play will confirm and apply the intended IWAD before play.

I have about 200 wads installed, including every Cacoward winner & runner up since 2018, and 75% of them get allocated a correct IntendedGame, including wads intended for Doom, Doom2, Heretic, TNT, Plutonia and of course Doom 64. I think we can eventually get to 100%, but this is a good start.

@nstlaurent
Copy link
Copy Markdown
Owner

Hi, I just got back from vacation and was reading through this. I'm planning on doing a release very soon since there hasn't been one in a while. I will save this feature for the release after and then there will be plenty of time to add more and test. I will continue to look at this over the weekend.

@kenbot
Copy link
Copy Markdown
Collaborator Author

kenbot commented May 31, 2025

No worries mate, welcome back! Are there any bug fixes, polish etc you want for the immediate release?

@nstlaurent
Copy link
Copy Markdown
Owner

If you have discord you can find me at the Helion discord server as haxxx

@kenbot kenbot force-pushed the sync-gameid branch 2 times, most recently from 7cf77e2 to d32d29e Compare June 2, 2025 02:43
@kenbot kenbot force-pushed the sync-gameid branch 3 times, most recently from 253f449 to a5490a4 Compare June 17, 2025 13:44
@kenbot kenbot force-pushed the sync-gameid branch 2 times, most recently from ad30915 to 63f1231 Compare June 27, 2025 02:22
@kenbot kenbot force-pushed the sync-gameid branch 2 times, most recently from 2d01fc9 to 1a9b18f Compare July 3, 2025 16:08
@kenbot kenbot force-pushed the sync-gameid branch 2 times, most recently from 5678d56 to b8ca338 Compare August 12, 2025 15:05
kenbot added 3 commits April 17, 2026 22:44
GameID column is INTEGER, it won't work. Ripping it out

New GameFiles columns for IntendedGame and IsSyncNeeded, basic sync capability IntendedGame

IsSyncNeeded column control auto-syncing, page by page as viewed

Autosync works for Grid view too

Improved IWadInfo class, IntendedGame is now a typesafe IWadInfo field. Also some improved IntendedGame sync

Fixed broken tests

Refactored TextFileGameFileFragment to be more testable, added tests. Improved quality of sync data

Finds title in GAMEINFO if it can

Syncing now respects IntendedGame if it can

Renamed GameFileFragments to SyncActions
Resolving minor merge conflict

Fixed line ending to LF

Completed rename on new test file

Some concurrency protection for syncing

Shouldn't return null here

Fixed messed-up rebase

Final rebase cleanup

Backup game capability

Sync respects backup game

When launching the game, it will validate and correct the IWAD

Added better backup games, eg so that Tech Gone Bad defaults to regular DOOM instead of DOOM1

GameConfSyncAction changes IntendedGame rather than IWadID

Get IntendedGame from GAMEINFO

Some more corner cases for GAMEINFO

Repairing rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants