I'm not sure about sun and ambient, but there is something terribly wrong with your functions, take a look at FNC ('time for script execution'):

This value normally is bellow 0.9 (some times it's of course bigger, but only for really complex projects!)...

As an alternative, take a look at this (55 loops running and only 0.3 for script execution):

That's probably one of the main reasons for the framerate drop!

F.e. take a look at this complex scene by sivan's map editor:


So first of all, you need to look throw your code, and make sure that execution time get's lower. After that we'll need to dig more into your sprites and models, cause I don't really see any reason for REF being around 72..

Edit: on the last picture FNC is 5.0... O_o can you please send this project to me via PM? I won't share/use it in any ways, I just want to take a closer look and find out wft is going on there.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung