Hi everyone,
I have just released Gideros 2024.11, and this times it comes with huge changes, in fact so huge that it may require you to rewrite some lua code. Why ? Mostly because I noticed LuaU had been seriously improved and that Gideros could benefit from the latest version of LuaU, and because during the update process it came to my mind that we could gain 20% of memory without much effort.
What happened is that a normal luau value takes 16 bytes of memory. Most only take 12 (a double value and a type), but luau chossed to use 16 for alignment performance reasons. When they added the vector type, they saw that a vector of 3 values would fit in the 16 bytes (3 floats of 4 bytes and the type), but a vector of 4 values would make the lua value take 20 bytes. Vector operations are really interesting in 3D, and I thought vector of 4 values would be great to describe colors (R,G,B,A) so I enabled vector of four values, without realizing that because of that, every lua value would then be 20 bytes and no longer 16. This is a severe waste of memory, and honestly vector of 3 values are typically enough. So the new version of Gideros reduces the vector size to 3 values (x,y,z), and introduce a new lua type for colors, built with ColorValue(r,g,b,a) constructor. It takes less memory, but it is also faster!
New LuaU is also more efficient by itself: it comes with compiler optimizations (such as function inlining), imroved processing time, and I also added my own touch on top of it, such as introducing the length (#) operator on vectors.
More will be coming in near future, such as native compilation (kind of LuaU JIT). Currently only enabled on Windows Gideros Player for testing purposes, it should be really effective on compute-only pieces of code.
Full change set:
Breaking changes[lua] Update Luau
[general] No longer use four values lua vectors
[general] Use new lua color type (built with ColorValue function) in lieu of vectors of four
Improvements[core] Add Core.getScriptPath() call
[script] Build luamidi on QtLinux
[layout] Add an option to set aspect ratio for a Sprite's content
[application] Add a request to apply pending style changes immediately
[general] Speed improvements
[player/qt] Enable native code generation in Luau
[plugin/liquidfun] Add missing particles APIs (Fix #227)
[plugin/tntvirtualpad] New Optimization: ^0.5 instead of math.sqrt (much faster)
[export/android] Upgrade to latest tools
[export/qt] Report command line in application:get()
Fixes[backend/gl2] Reset vertex attributes before each framebuffer draw
[styles] Fix style handling API issues
[sprite] Improve hitTestPoint vs rotated shapes (Fix #170)
[backend/gl] Ensure buffers are unbound at frame start
[backend/gl] Catch empty VBO condition
[backend/dx11] Correctly enable mip mapping
[core] Fix threads signaling
[plugin/luamidi] Remove 'yields' on OSX version
Download it from here:http://giderosmobile.com/download
Comments
does in particular the imgui plugin work well with the changes (color vector)?
thanks
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
thank you captain for all your precious work
Likes: MoKaLux, MobAmuse
> Task :app:compileReleaseJavaWithJavac FAILED
C:\Temp\TropicalTreasures2\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\frameworks\AdsMax.java:55: error: cannot find symbol
AppLovinPrivacySettings.setIsAgeRestrictedUser(true,sActivity.get());
^
symbol: method setIsAgeRestrictedUser(boolean,Activity)
location: class AppLovinPrivacySettings
C:\Temp\TropicalTreasures2\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\frameworks\AdsMax.java:260: error: cannot find symbol
else if(errorCode == MaxErrorCode.NO_ACTIVITY)
^
symbol: variable NO_ACTIVITY
location: interface MaxErrorCode
C:\Temp\TropicalTreasures2\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\frameworks\AdsMax.java:314: error: method does not override or implement a method from a supertype
@Override
^
C:\Temp\TropicalTreasures2\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\frameworks\AdsMax.java:319: error: method does not override or implement a method from a supertype
@Override
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
implementation 'com.applovin:applovin-sdk:+'
Likes: MobAmuse
https://github.com/gideros/gideros/commit/c8d3b41e98ce21d88dda7dd29de295845d2b9118
Perhaps you can change it on your side (in your All Plugins\ads\bin\Android\src\com\giderosmobile\android\plugins\ads\frameworks folder) and check if everything is ok ?
BTW, it looks like you can no longer use AppLovin if your app can be used by children:
See "Prohibition on Children Data or Using the Services for Children or Apps Exclusively Targeted to Children" here: https://developers.applovin.com/ja/max/android/overview/privacy/
Likes: MobAmuse
Yes thank you, regards the Prohibition stuff understood and all good.
Thank you
Likes: MoKaLux
https://wiki.gideros.rocks/index.php/ColorValue
I will try to add the new additions asap God's willing