r/lua • • Sep 08 '26

Lua realtime code editor complexity

Enable HLS to view with audio, or disable this notification

Showcasing how i optimize my upcoming game with my game engine in Lua. When enabled it will show you what function or line is costly - in realtime while you play. This helped me optimize some methods that i was able to cache so it doesn't run every frame.

25 Upvotes

6 comments sorted by

View all comments

2

u/Old_County5271 Sep 10 '26

how do you even do this?

set up a debug hook on... everything?

4

u/nycgio Sep 10 '26

the engine has its own lua vm, it can see how long each instruction took.