21
AGI Development Tools / Re: The web version of AGILE (https://agi.sierra.games)
« Last post by lance.ewing on April 08, 2024, 12:54:28 PM »Unfortunately, there are some problems loading the imported games (Fan games load and play fine). Here's a video of the current errors: https://drive.google.com/file/d/13C3JOZBwA99aVaNrpzToXroiP35BO7O2/view?usp=sharing
Hmmm, this looks like it is in the OPFS part of the code. One of the methods I'm using isn't recognised. The saved game OPFS code works though, but that code doesn't use this particular method. It must be a more recent addition. Let me look up the documentation and release notes to see if I can find anything. Will report back later (will probably be tomorrow now).
It is bad news, unfortunately. Safari doesn't yet support the "createWritable" method on a file handle in OPFS. It is showing as not implemented on the MDN page:
https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle
There is a bug associated with it (see comment 7):
https://bugs.webkit.org/show_bug.cgi?id=231706#c7
I'll have to get my head around OPFS again to see if I can use the approach I used for saved games when storing the game data files. It uses a SyncAccessHandle instead, which is supported by Safari. I avoided that one for the game data files for a reason but I need to work through it again to remember why. Hopefully it was one of these "too hard" decisions rather than "its impossible" cases. If it was simply harder than the other approach, then it might still be possible. Hopefully I can get this working then.