Dear all,
I've just released Gideros 2023.5, after a series of non released intermediate builds (2025.2 and 2025.2.3).
It comes with its usual collection of fixes, but also with new calls.
Core.fileLoad(filename,{ options }) / Core.fileSave(filename,data,{ options }) instructs Gideros to load or save data from/to a file in a single call with performance gains and improved features:
- data can be a lua string or a lua buffer (buffer=true option when loading)
- data can be compressed / decompressed on the fly using zlib (compression=true option)
- operation can be made asynchronous to rendering loop, preventing dropping FPS in your games (async=true option). Only available if the call is made from an async call (see Core.asyncCall).
Also, when working with async calls, you'll sometimes want to control when your thread is auto yielding or not, because auto-yielding may happen in the middle a something that should never be interrupted. To deal with this, I added two more functions:
Core.setAutoYield(boolean): Enable or disable autoyielding for the calling async call.
Core.yieldlock(boolean): Ensure the thread won't yield, an error will be thrown if it tries to do so. This is mostly for debugging purposes. There must be exactly the same number of Core.yieldlock(true) and Core.yieldlock(false) in your code paths.
In addition, Core.asyncCall has been modified to allow disabling the autoyield function on creation (previously it was always on). To do so, it now accepts an optional boolean as first argument to tell if auto yielding should be enabled or not. If present, the function to call and its arguments are passed in parameters 2 and beyond.
Full change log:
New features[core] Add optimized file loading and saving functions
Improvements[html/js] Improve JS interaction API
[core] Revisit auto-yielding in async tasks
Fixes[sprite] Rework caching system possibly less efficient but more correct
[sprite] Fix graphics not revalidated for hidden objects
[profiling] Fix crash when resetting profiler from lua
[qt] Honor display scale in seconday Screens
[export/qt] Enable context sharings for Screens
[export/uwp] Allow textures in vertex shaders
[export/qt] Fix a crash when using Screen due to invalid GL context being bound
[plugin/controller] Fix for building on UWP
[build] Allow building HTML plugins outisdde of main tree
[build] Allow skipping signing of Windows installer
[export/ios] Update openUrl call to non deprecated API
Download it from here:http://giderosmobile.com/download
Comments
async file save/load is a really nice feature i wanted for long. in my use case my file has a header (to recognize it is the correct file type before opening and some additional more info about it (like version etc)) and then the rest is the compressed data (zlibbed json). can i save such a file with these new calls? a small example on the wiki page to async save/load a file would be useful i guess, so that this amazing feature is not lost/hidden.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh
https://www.dropbox.com/scl/fi/hlwo9bz9jpg3tocemsfii/error-report-6.txt?rlkey=wxmxzvd9v33h7z83x8ht7qgbg&dl=0
i guess you already know about this leftover, and it is not a major problem, but still wanted to note (and considering how stable gideros is in general, perhaps you want to find a solution).
thanks again
Fragmenter - animated loop machine and IKONOMIKON - the memory game