Why do you even use deform sprite ? Just make grass model with crossed planes and that's all. They don't need to "look" at you as you move. Just use regular material without deform sprite.
Yes i know that and it would even make me use a single material for all (that would bring the draw call's down even more) and i'm planing to have lod0 and lod1 be cross planes but i want to have the ability to have at the long distance "impostors" and those are flat planes, if i don't use deform sprite or a similar lookAt function they look odd.
so every grass has a loop in script? every entity has a loop that runs every frame within the c++ code, look for the "think" function, you could code this in c++ and so you would not waste resources in the scripting side, you can also look into how The Dark Mod implemented their LOD system too.
Yes every grass object has a loop in script if you know how to make it otherwise (make it so they don't "think" all at the same time) and tell me i would be very grateful.
About the engine code again my c++ knowledge is very limited, i know it sounds like i'm afraid of going to the engine side (and i'm a little) but in reality i don't want to mess with fhdoom engine source, for the simple reason that, is more complicated code and if eXistence updates the engine, my code changes could make it impossible or very hard to update to the new version, if i can do it in script, better, if not i try other stuff, i'm just experimenting and learning for now.
Btw i changed the script so the loop runs only if the player is moving if not the loop stops, improved performance even more.
Edit: For anyone using notepad++ code editor i made a custom language highlighter for idtech4 script,
here, anyone can edit it, so be carefull, the colors are for a dark theme tho but you can easily edit them in the notepad++ user language editor , is not fully complete (you can help) but most of the script functions are there, there's also custom coder keywords like TODO: , NOTE: , WARNING: , to help organization, to use them just write the keyword after single/multi line comment like so ex: //NOTE: "my note" and it will work, i also made a (very incomplete) code auto complete/auto function helping
here, but unfortunately it doesn't seam to work and i don't know why.