I figured out one of the sources of lag... the AI module! I tried the scenario with no AI enabled, and the traffic teleports were as smooth as butter. I feel that the AI code needs to be optimized. For now, more experiments will be done. Stay tuned.
maybe the AI just needs to figure out where it is and where to go after being teleported? That would mean nothing can be done until game AI code is optimised though. Or I might be completely wrong in my assumption because I know nothing about modding and coding, who knows?
Gamergull updated Hectic Delivery (Gull) with a new update entry: Version 1.2 Read the rest of this update entry...
Alright, I got some interesting results with traffic teleportation. If I disable a traffic car's AI for several frames, teleport it, and turn its AI back on, I still get a drop in FPS, but much less drastic stutters. I have a midrange PC, so I notice a 10 - 15 FPS drop for a second with this method, otherwise the game would get stuck for a few frames with the old method. I do believe this is CPU related, so users with a faster CPU might not even notice anything. At this moment, it doesn't look like I can remove the FPS drop entirely, but it will have to do. I'm thinking of releasing Version 1.2.1 with this new method, so I can see if it's worth it in the long run.
New feature! Traffic vehicle colors can be changed on the fly, with no lag! Every time a car teleports, it gets repainted! Less deja vu! Disclaimer, the paint jobs shown here were picked by the RNG.
Nice idea to have colors changes ! I suggest you also to take a look at the "dam jump" code, using it, you should be able to let the user choose his car at the beginning
Gamergull updated Hectic Delivery (Gull) with a new update entry: Version 1.3 Read the rest of this update entry...