How many Planes until lag kicks in?

● ARCHIVED · READ-ONLY
Started by PabloNeirotti 4 posts View original ↗
  1. Hey guys!

    Looking for some technical insights more than anything. Quick intro:

    I've used the well known, or so I believe, Multiple Fogs script. Later on I made one of my own that was easier to use, smaller, and able to work seamlessly with weather conditions. I call it the Layer Effects module.

    The performance remained the same. So I don't believe it has anything to do with my own script in particular.

    Now that I need to use my laptop to demo it, I can really tell the performance hit in this machine compared to my desktop.

    Without Planes, or with Planes at 0% opacity, the game run almost flawlessly. With Planes, down to sluggish 45 FPS. On other games would be okay, but drawing is tied to frames instead of time in RM, so, it feels slow-mo.

    I am right now testing with about 8 active Planes (which desktop barely notices, but kills my laptop), although for playtesting I downgraded it to 4, which makes a big difference.

    Each effect layer is about 1000 x 500 in size, PNG.

    So! Questions:

    1. Is it normal that the performance decreases significantly by having only 4 active Planes? Are these that costly?
    2. Is there any optimization script made already to improve the way these guys are drawn?
    3. Alternatively, anyone can think of a better way to draw particles in air to represent wind flow?

    Would love to hear your insights, and might as well open for discussion :)

    Cheers!
  2. Graphics processing in RM is costly... As for how much lag it can produce, that depends on the computer running the software...
  3. A plane at 0 opacity is still a plane and will still trigger the same processing. Are you SURE changing the opacity, but still having the same number of planes, gave you a performance improvement? Or was that ONLY when you reduced the number of planes?


    Have you tried the same multi-fog script just to ensure it's not your own script that's doing it? I've only ever used 2 fogs at a time.


    Is it only when you have other weather conditions active that the problem happens, or is it more noticeable when you have weather effects? Or does it also happen without them?


    I'd be interested to see your script, just in case there's any logic that could be simplified/improved (not that I think my own is flawless - it's just easier to help when we know exactly what you're working with)
  4. Yes, indeed 0% opacity speeded things up xD. I was gonna complain it was poorly optimized but apparently, if there is nothing to draw, it won't draw. Which kinda makes sense.

    I did try that multi-fog script. The lag really comes when a Plane is activated, really, since on these scripts one does not do the drawing, but instead rely on Planes to do it. And that's where the lag originates.

    Maybe I should try to move some layers, where fits, to a particle system (you know, using sprites). I saw there is one, not sure if it accomodates to my needs but will give it a look and a try later.

    And, as for now, my layer effects are using no Zoom nor Tone. Leaving Zoom to default had a noticeable improvement on performance. I also played with Graphics.frame_reset for hours and made it look more fluent now when otherwise would be epic slow. Still not quite there...

    ... I will experiment with file size next!

    EDIT: No, using tiny images did not change performance for better or worse...