I was making game the other day and i wanted to include something like cinema in it , but then i realised that i could not play videos in the game.
I could do everything with decals frame by frame but i think that would cause lots of lag.
So is there efficient way to play videos in roblox?
You have to work locally. Before a player needs to see the video, preload all frames and show them one by one again, locally. The real problem here will be delay. The video must not go above 33 FPS as the minimum parameter for “wait()” is 0,03. You could also use the RenderStepped even instead of a loop with a “wait()”, but then the video length will be based on the refresh rate of the player’s monitor.
In short words, what I would do would be upload the frames of a 30 FPS video, and then run the movie in a local script using a loop.
Remember: Use a local script, not a global one.
I believe sprite sheets would be a better alternative to decals.
This would be much better, however, wouldn’t there be an issue with image quality?
You don’t even have to stick with 30FPS. You could make some frames longer than others if nothing’s moving, so you could save time!
That would too laggy and ineffective loading all the decals at the same time and keeping all of them overlapping each other.
I mean it’s a gif so you might want to change the type of resolution by changing the type of file to reduce lag.