Game Performance - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Games Development (https://www.save-point.org/forum-4.html) +--- Forum: Code Support (https://www.save-point.org/forum-20.html) +--- Thread: Game Performance (/thread-6182.html) |
Game Performance - Mel - 11-03-2016 So it seems my game has a really bad performance. As described earlier in the What's up RMers Thread my CPU goes crazy when running my game. (11-03-2016, 04:02 AM)DerVVulfman Wrote: But do you have things that take up full map graphic resources like Fog of War, or ABS mice that shoot particle effect fireballs? I use the Dynamic Time and Light System from TimeKeeper. I think it plays a role in this issue. It drops the FPS sometimes from 60 down to 40~30. I have to say that my Anti-Lag Script isn't completely compatible with the lights. I think the game always loads all lights at once. But as far as I know thats the only script which affects the whole map. Everything else are menu systems and database scripts. I run several parallel process common events but I can't imagine that they are causing so much trouble. RE: Game Performance - BeJeremiah - 11-04-2016 I imagine its either load from a script OR load time on graphics. Try taking all your scripts and putting them in a blank project or one with one small map. Test it. If have same problem, remove one script and test again... rinse and repeat of course. If you problem stop without changing scripts you maps may be too large to render without difficulty processing. Hopefully its just a script though. Easy to fix that most of the time. RE: Game Performance - Mel - 11-05-2016 I will try that of course. Thx for that idea. Might be alot of work though. RE: Game Performance - Mel - 11-17-2016 Now, I know the reason for these problems. It has to do with the "Reduce Screen Flickering" option. If I deactivate it I get stable 60 FPS and my CPU runs fine. But...I always have these weird flickerings on my screen without it. So I can decide...framedrops and crazy CPU without flickering...or smooth game with flickering. RE: Game Performance - DerVVulfman - 11-17-2016 Sort of... It is graphics related to be sure. However, turning off the screen flicker option using the F1 key is only a temporary solution as your intended target may want to turn it on to avoid the flicker. RE: Game Performance - finalholylight - 11-17-2016 I think it could be from the code, maybe there are many parallel progresses in the script that updates too often. RE: Game Performance - Mel - 11-17-2016 Hmm...I'm pretty sure now, that my problem is a combination of some parallel processes and the light script. I managed to reduce the lag with changing some parallel events but the main issue remains and that seems to be the light script. When I turn it off there are no lags at all. And my game looks only half as pretty as with activated lights. But...it only conflicts with the "Reduce Screen Flickering Option". Is there maybe another way to erase these flickerings? This overexerts me... RE: Game Performance - finalholylight - 11-17-2016 Would you mind upload some screenshot of parallel events that call the light script. RE: Game Performance - Mel - 11-17-2016 The light script itself doesn't use parallel process. It's just a mix out of both which drains my game's performance. With the parallel process I constantly save the Map ID and the player X and Y values into variables. The lights are defined with normal events. This is the script, if anyone ist interested: http://pastebin.com/2ZHPtvvY RE: Game Performance - DerVVulfman - 11-17-2016 Kinda confused. Did you comment out the commands at the bottom yourself? Code: #============================================================================== Because this would be running the time system itself, specifically the command of $game_system.time.update which runs the whole system. HOWEVER... there is no limiting factor in the Time_System class's update method, and a system this big is running constantly. I wouldn't have it run the update method every single frame!!! I'd have it check to see if some span of time had changed to an extend. I mean, a normal game runs at 40 frames per second (or yours at 60), I'd have a feature like run Time_System's Update method every 5 frames That would still let you have a decent game-time system but it only checks 1/5th the time and speed up your FPS. I use such a method in my HUDs, like in the Lycan ABS hud, so it doesn't refresh the screens constantly. If I didn't, it would refresh over and over and slow it down. It's the same principle here. This would be the culprit... and where I'd fix it to put in the limiting factor Code: #-------------------------------------------------------------------------- |