Working on finishing up LunaHUD for GitHub/Nexus and ran into a few bottlenecks I'd like some input on.
First, regarding real-time stats (hit-to-shot ratios): I want to keep the overhead at a minimum to avoid any jitter. Would you guys recommend handling the math inside a thick_update, or is it cleaner to hook into PlayerManager event listeners so it only triggers on actual hits? Looking for the most performance-cheap way to keep the data accurate.
Also, I’m struggling with resolution scaling. My elements are drifting when switching between 1080p and 4K. Are people still messing with render_template for this, or is there a more modern/reliable way to anchor panels in SuperBLT without hardcoding offsets for every resolution?
Lastly, for localization—is it better to just use the game's native string macros for basic stuff like health/armor, or is that just asking for conflicts with other HUDs? Better to just ship a custom localization file from the start?
Appreciate any insight.
About me:
I'm a millennial with almost three decades of experience coding, though lua isn't and never have been my go-to language, modding games (partially because I got kids that play games that support mods and they are all in lua), thus don't worry about being direct and technical, though I do wish to state I won't share major information in this thread. It will dilute or sidetrack the subject which I take seriously, and look forward to your answers to!
SGJ "LunAlpha"