Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
luau discussion — Gideros Forum

luau discussion

i thought that the discussion about luau deserves its own topic.

See luau info:
https://luau-lang.org/

See some previous discussion here:
https://forum.giderosmobile.com/discussion/comment/66096#Comment_66096
and here:
https://forum.giderosmobile.com/discussion/8498/can-anyone-teach-me-how-to-debug-with-zerobrane-studio#latest

my main concern is about zerobrane studio and debugging, some feedback from the developer is here:
https://github.com/pkulchenko/ZeroBraneStudio/issues/1129
and some info about debugging here:
https://github.com/Roblox/luau/discussions/240

Likes: MoKaLux

Tagged:
+1 -1 (+1 / -0 )Share on Facebook

Comments

  • SinisterSoftSinisterSoft Maintainer
    edited December 2021
    imho the advantages (many) far outweigh the disadvantages (few). Even then, there may be future workarounds for the disadvantages. Read the debugging section on this webpage: https://luau-lang.org/performance#epsilon-overhead-debugger
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • hgy29hgy29 Maintainer
    Also we will be using our own fork of luau: https://github.com/gideros/luau
    I'll try to bring back features we need into it. I already added our specific operators, io library, int64, loadstring/loadfile and patched a few internal details to make it work with Gideros without having to rewrite too much of Gideros code.
    I still need to address profiling and debugging within Gideros Studio: the former should be rather easy, and luau native hooks should be enough for the latter.
    I also need to take care of lua shader stuff.
    +1 -1 (+3 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    edited December 2021
    Just a quick note to say that I tested an early version of @hgy29 's Gideros Luau. For a quick speed test, I increased the number of enemy baddies in my game to an extreme high amount so that the frame rate would drop. Gideros Lua went down to 4 fps, whilst Gideros Luau was 5 fps. That was the same code running on both versions.

    An increase of 4 to 5 is 25% faster - and this is without focusing on any of Luau's strengths.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Here are the benchmarks on regular Lua vs Luau...


    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • actually i don't think 25% is such a gamechanger, i expected more. it is more or less equivalent of waiting half a year (or a year) to make the average machine this much faster.

    btw. this luau thing made me recall the times when moving to luajit was considered, giving us similar speed increase. i think it always remained a beta and never made it into gideros for some reason, am i right? if yes, what was the reason?
  • SinisterSoftSinisterSoft Maintainer
    edited December 2021
    One of the reasons was that using LuaJIT was an issue on iPhone and also UWP. I used LuaJIT on Android until we made the operator improvements to regular Lua.

    The 25% increase in speed btw is the difference between 48 fps and 60fps (!!!), and that was without any change in code to take advantage of Luau - it was also a very simple and quick rough test, it's likely your game may have even better speed improvements (especially if it's Lua intensive rather than spending a lot of time in the API side of things) - on the Roblox forums they have seen much more significant speed increases.

    If you look at the benchmarks above, with code changes there are huge improvements in speed.

    I also had no issues with GC and stuttering, so I'm guessing they also improved that.
    https://luau-lang.org/performance#improved-garbage-collector-pacing

    Luau has native vector math - so for game that need vector math, this will bring great speed increases compared to normal Lua.
    https://luau-lang.org/performance#native-vector-math

    Another major thing is that true multi-core multithreading has been demonstrated using Luau and Roblox. This means that it should also be possible with Gideros Luau.

    Likes: keszegh

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    Quick update about Luau integration with Gideros: I managed to get luashaders work with luau, and in fact the code generator is more robust and efficient with luau, thanks to their Ast internal representation. Even complex if/then/else should work in luashaders now, while it was a pain with classic lua. This was my main motivation about switching to Luau.
    I also managed to have profiling work, and the outline pane seems ok too.
    I was able to run a complex project of mine, and it runs without any problem.

    So what is left ?
    - Integrating the Linter into Gideros Studio
    - Making it compile for all supported platforms (only QT so far)
    - Find a way to add debugging back in
    +1 -1 (+4 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    edited December 2021
    I tested it with Zombie Rocks and it ran perfectly. I also tested it with the Lua (now Luau!!!) 256 colour palette sprite shader and that also worked fine.

    Update: Now tested with ReportComplete (to check imgui) and Ping Pong DX (to check cbump) - both work great!

    Likes: MoKaLux

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    edited January 8
    I tried the test version yesterday, @hgy29 added an editor feature (as a result of moving to Luau I think) that is actually AMAZING! I'm not going to say more, except that it's great - not just for people who may be new to Lua, but it will also help experienced people too (I can't believe how much it has helped me so far!).

    It just goes to show that he was right to move from Lua to Luau.

    Likes: MoKaLux

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    @keszegh lol. I don't mean to be secretive, but it's a really nice update of something in the editor that's incredibly useful. I think the update is directly due to the use of Luau (but I'm not certain). I don't want to spoil the surprise though, so I'll say no more.

    Likes: keszegh

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.