I heard that the reason why music identifiers don’t work offline is because their databases are huge, with millions of songs (including video game music). Databases containing only video game music may be significantly smaller, even if they contain the soundtracks of over 1000 games.


Possibly. Using meta data to identify sound should be relatively small. Then, sound samples from the first few seconds would allow comparison without the burden of having everything. Getting the data and samples is probably the hardest part.
There are open source tools to do this kind of thing, you should see if they have offline versions.
I’ve used music brainz picard in the past.