Hey everyone,
I’ve been working through the Lua track here on Exercism and it’s really changed how I think about table structures and functional programming. I’ve been trying to take those “clean code” lessons and apply them to a side project where I analyze different free delta scripts to see how they handle memory management during long execution cycles.
However, I’m running into an architectural issue. Most of the logic I’m seeing in these gaming scripts is very “spaghetti-like”—lots of global variables and deeply nested if statements. When I try to refactor them using the more idiomatic Lua patterns I learned in the exercises here, the scripts often fail or lose sync with the game executor’s timing.
Has anyone else tried to bridge the gap between “proper” coding standards and the “hacky” nature of mobile automation? I’m curious if I should be prioritizing readability, or if these types of scripts actually benefit from being less “clean” due to the weird environment they run in. Does anyone have advice on how to keep scripts modular without introducing too much overhead that might lag the executor? I’d love to hear how you guys balance professional coding habits when working on unofficial or hobbyist projects like these!