Game Performance
#1
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.

[Image: gg5xe0bwvmh7.png]

(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?

Still, yeah.  Might need to see what ya got in a 'Code Support' thread,

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.
Reply }
#2
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.
Reply }
#3
I will try that of course.

Thx for that idea. Might be alot of work though.
Reply }
#4
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. Confused
Reply }
#5
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.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }
#6
I think it could be from the code, maybe there are many parallel progresses in the script that updates too often.
Reply }
#7
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...
Reply }
#8
Would you mind upload some screenshot of parallel events that call the light script.
Reply }
#9
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
Reply }
#10
Confused Kinda confused. Did you comment out the commands at the bottom yourself?
Code:
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  alias dtls_main main
  def main
    #@time_window = Window_Time.new
    #if !$game_system.activate_time_window || !$game_system.activate_time
      #@time_window.visible = false
    #end
    dtls_main
    #@time_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias dtls_update update
  def update
    #$game_system.time.update
    #if $game_system.activate_time_window && $game_system.activate_time
      #@time_window.visible = true
      #@time_window.refresh
    #else
      #@time_window.visible = false
    #end
    dtls_update
  end
end

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:
#--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Check if the system and the time are activated
    if $game_system.activate_dtls && $game_system.activate_time
      # Increase the minute count
      @minute += DTLS::CountMinute
      # Update the time data
      check_time
      if day?
        $game_switches[DTLS::IsNightSwitch] = false
        $game_switches[DTLS::IsDaySwitch] = true
      else
        $game_switches[DTLS::IsNightSwitch] = true
        $game_switches[DTLS::IsDaySwitch] = false
      end
      $game_variables[DTLS::MinuteVariable] = @minute
      $game_variables[DTLS::HourVariable] = @hour
      $game_variables[DTLS::DayVariable] = @day
      $game_variables[DTLS::MonthVariable] = @month
      $game_variables[DTLS::YearVariable] = @year
      $game_map.need_refresh = true
    end
  end
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Game Variables List for Copy/Paste JayRay 4 7,011 01-15-2015, 06:18 AM
Last Post: JayRay
   [RMXP]Game Over and Atoa Battle Status mishaps firestalker 8 10,952 08-07-2014, 01:59 AM
Last Post: firestalker
  Changing Window Styles in Game JackMonty 8 11,036 03-22-2013, 11:54 PM
Last Post: JackMonty
   Game help n2t4a6 11 14,737 04-21-2010, 06:42 AM
Last Post: n2t4a6
   Animated story on New Game... KDawg08 3 6,420 03-31-2010, 03:52 AM
Last Post: KDawg08



Users browsing this thread: 2 Guest(s)