Laggy Movie Issues

Hey everyone. After about 16 hours of tinkering, I'm ready to rip my hair out, so I'm hoping I can find some guidance here. Let me give you the history.

I'm creating an interactive website ui using rpg maker. After 150+ hours of work I'm really pleased and I like it a lot. Went to deploy it to web for debugging and ran into my first deployment issue. I was using Ramza's Pre Title Splash plugin to run a 'loading' movie before the title screen. Upon pulling it up to web I was met with an error that even Ramza couldn't understand as they had not tested it on web. After 10 hours of tinkering with that, I discovered how painfully simple it was: on desktop, files are not case sensitive, but on cpanel--they are. So just changing the case of the file call line fixed it...orrrr... nope. It led to the next issue. Turns out since 2018, you can't autorun a video on any browser unless one of two conditions are met. 1. the user has interacted with the page by clicking, tapping, etc. or 2. the video is muted by default. After 3 hours of research on that and tinkering with the code repeatedly... I decided that I don't know java well enough to get the syntax right and gave up, deciding to just run the loading screen AFTER the title screen, which would fulfill condition 1 above. That's where you come in.

I began tinkering again. I put the video as an autorun event on the main map. No matter what code I put in, the video would just play on an infinite loop. I tried break loop, I tried end process, I tried end event, I tried a self switch to a break loop page, nothing--but even though the video was endlessly looping, it was playing perfectly smoothly. I gave it another thinker... created a blank map with only 1 event on it. "play movie" and then "transfer player" to the main map. Eureka... oh nope. We have yet another problem. Now the video lags unbearably.

The details:

It is a 6 second long webm file with a 1.9mb file size. at 1080p.
The event couldn't be simpler. Look at the page here: https://ibb.co/ZLd6SrM
I've tried turning off all of my plugins and it still happens.
I've created a completely new game with 2 blank maps and it works perfectly.

I'm definitely a novice at... all of this. So pleeease help me, more experienced devs!
"Break Loop" only works if you have a loop in your event in the first place. It doesn't affect an events trigger.

What I would do is create a new event page and on your first one, set a self switch to change to that page after the movie is finished.

1687873912840.png

1687873939532.png


EDIT: Just saw that this is for MZ and not MV, I'm pretty sure it should work the same though, If I'm wrong though somebody who does use MZ feel free to step in lol
Ah I should've clarified that the break loop line was just me screwing around seeing if anything would stop the lag. I'm going to try your rec right now thank you!
Ah I should've clarified that the break loop line was just me screwing around seeing if anything would stop the lag. I'm going to try your rec right now thank you!
You're welcome! Let me know if you're still having issues
You're welcome! Let me know if you're still having issues
still laggy ;(
Ok so. I repurposed CooperTheJackal's advice. Copied the event they helped me create into map 1. Deleted the blank extra map. Set starting point back to map 1. No Lag and video isn't infinitely looping anymore. Awesome.

One minor thing remains. You can see map 1 for roughly 1 second before the video starts. Any way to eliminate that? An autorun fade event or something?
Ok so. I repurposed CooperTheJackal's advice. Copied the event they helped me create into map 1. Deleted the blank extra map. Set starting point back to map 1. No Lag and video isn't infinitely looping anymore. Awesome.

One minor thing remains. You can see map 1 for roughly 1 second before the video starts. Any way to eliminate that? An autorun fade event or something?
What I usually do is have the screen tint to full black without the wait checked
1687875136163.png

EDIT: If the map still shows up try adding the "Wait for Completion"

It miiight work and it might not, I'm not able to test it in MZ because I don't use it, but give it a try and let me know how it goes.
There's a brief flicker, but I can live with that. What I can't figure out is how to UN tint the screen afterward. lol. I tried adding a second "tint screen" with 0 tint in event page 2. Didn't work. I tried self switching to a third event page with an "erase event" command. Didn't work. Sorry I'm such a newb. I'm generally very good at figuring these things out given enough time, but I'm at the end of my rope with this!
No worries, I was in your spot at one point too and I don't mind helping people out.

Can you send me both of the event pages so far? You usually just have everything set to 0 to have it return to normal, like this.
1687876034858.png
I'm surmising that the problem is happening because I use the community lighting plugin, which requires me to set a tint to the screen in order to view the lighting effects I've created. I'm going to try something and I will let you know in a few minutes.
Ok so I tried using a plugin command to toggle community lighting effects off and then toggle it back on at a later event page after resetting the regular tint. And I tried doing the tint settings through the plugin instead of the generic command. And I tried removing the community lighting plugin altogether and that didn't fix it. So. Attached are the event pages that lead to a black screen after the video finishes.

Screenshot 2023-06-27 104111.png
Screenshot 2023-06-27 104054.png
I think for now I'm just going to tolerate that it shows the map for a second. I have too much left to do on the deployment. Like the fact that I think using it as a webpage on mobile is shaping up to look like I'll need an entirely different resolution and UI because the stretch feature doesn't just stretch the map to fit the screen while leaving pictures and videos the same size. It stretches the resolution itself with constrained proportions. Sigh. Trying to create something outside of the ordinary is hard!
Ok so I tried using a plugin command to toggle community lighting effects off and then toggle it back on at a later event page after resetting the regular tint. And I tried doing the tint settings through the plugin instead of the generic command. And I tried removing the community lighting plugin altogether and that didn't fix it. So. Attached are the event pages that lead to a black screen after the video finishes.

View attachment 267139View attachment 267140
So for the untint, you have the command right, but on the second page the trigger is set to "Action Button".

Outside of the tint command though, I don't think I can be of much more help. I hope you can figure something out for the map!
Instead of tinting, use fade out screen and fade in screen - that is the purpose of those two commands.

still laggy ;(
This is too vague to really help bughunting, because there are two different forms of delays that can be called lag: loading delay and decompression delay.
And they require different (and opposite) methods to solve.
So for the untint, you have the command right, but on the second page the trigger is set to "Action Button".

Outside of the tint command though, I don't think I can be of much more help. I hope you can figure something out for the map!

God I'm such a knob. This is actually only my second multi-page event in the whole project and the only one that's autorun, so I stupidly thought that the second and third pages would automatically be triggered by the first page, not independently. -____-

Switched the trigger to autorun and it worked. lol

Instead of tinting, use fade out screen and fade in screen - that is the purpose of those two commands.


This is too vague to really help bughunting, because there are two different forms of delays that can be called lag: loading delay and decompression delay.
And they require different (and opposite) methods to solve.
The fade in and fade out commands seem to run with a default duration. The problem with that is that the fake "loading" video I've made runs immediately after clicking the start button on the title screen, so the 30-60 frame duration of fade out/in still lets users see the map for around a second or so.

Now time to post about my next challenge! CameraMouseControl not working on mobile. Yaaay. Maybe I'll see you both there. lol

Thank you so much for your help.
Heyyy. I'm back! So... the one thing I didn't test before giving the thumbs up here was web deployment. Yesterday evening I deployed the game to my website to test it (I've since taken it down) and the video was suuuper laggy just like when I had the initial problem above. Since there was no lag in an exe export or during playtest, I pondered the possibilities. Now, my website is on a grandfathered hosting plan with low bandwidth and low ram. I upgraded it... and here's what happened: it lagged a lot less, but still lagged a little.

SO I reached out to my host and I explained the situation and asked them if they think its because I still don't have the necessary juice to run a game on my domain (read as "please let me spend more money!). And they said "uhh, dunno. What are you even talking about?" "that shouldn't be on our end. check your bitrate and maybe make your video smaller." Now bear in mind that I actually mistyped my video size above. It's actually 1.8mb, not 10.8mb.

So, I'm back here again. Hello. Any recommendations? Is the a line of 'preload' code or something like that?

I'm going to throw a draft on itch and see what happens in the meantime.

Thanks again

*Edit: jsyk, no errors are showing on the developer console*

*Edit 2: Lag persists on itch.io. The last 1 second of the video lags for 2 or 3 seconds*

*Edit 3: I shrank the video size by 40%. It is now 1mb. The lag went back to being maximum bad*
Please read my post #14 above again.
"laggy" is not a description that helps in any form, you'll need to give us more details on how exactly that looks to you when playing.

Because as said aboive there are different and opposing causes that are uisually called lag, and we need to know which of the different causes for lag is your problem to point you to a solution.

So please describe how the video looks, what happens and so on.
@Antimtr , please avoid double posting and bumping threads before 72 hours, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.
Has you try Eli Hold Fade?
It works for my very well
Please read my post #14 above again.
"laggy" is not a description that helps in any form, you'll need to give us more details on how exactly that looks to you when playing.

Because as said aboive there are different and opposing causes that are uisually called lag, and we need to know which of the different causes for lag is your problem to point you to a solution.

So please describe how the video looks, what happens and so on.

The video grinds to a halt, freezes for a moment, and then finishes.

I used screen capture to take a video of the issue: here

The condition is identical to the issue that Copper helped me resolve in both PlayTest and EXE. It now is only persisting in the most important place. Web deployment.

Has you try Eli Hold Fade?

Eli Hold Fade - Stops the automatically fade in when transfer maps.​

Author: Hakuen Studio Introduction Have you ever felt the need to start a map faded out, to configure some events or images without the player seeing? It is true that when transferring from one map to another, you can use fadeout on the previous one and fade in on the current map(But not if it...
forums.rpgmakerweb.com
forums.rpgmakerweb.com
It works for my very well
This is awesome thank you I'll test it out.

Original thread: https://forums.rpgmakerweb.com/threads/laggy-movie-issues.158738/