Hello everyone !
I am quite confused about a problem I encounter since the beginning. It's about animations.
When I playtest the game, in battle, the game lags when a new animation arrives (with a skill that was not used before during the playtest). That makes the entire Action Sequence look bad. The next time the animation arrives, it isn't laggy anymore.
So it's like the game loads the animation right when the code ask for the animation to be displayed and after that, because the image is already loaded, no problem.
Do some of you encounter the same problem ? How do you faced it ? Is it only my computer ?
I have tried using a preloader plugin (two in fact), but it makes it even worse 😮
It's obvious that my computer is not good for playing games and good computers may not have this issues with my animations, but I prefer to build the game as if a bad computer would run it, in order to make a great experience to everyone.
So please help 😢
I face problems with lags during testing all the time. And since I began using Quasi plugins, I have been facing problems with insufficient loaded resources, so for example I have to load certain images myself through preloader or use the thing multiple times for the resource to load.
The best solution for me to adress battle lags was to not test battle directly, but create a map event to have a battle processing. This way all battle resources got loaded at the beginning and I needed not to worry about more lag than my cpu normally creates.
My battles are opened by touching certain events on the map (monsters, basically). Is it that that you mean ?
Happy to see that I am not the only confronted to these problems
What you're both forgetting here is that MV is HTML5- and Browser-based, which means unless you're installing a preload plugin (which will cause other problems) all files are only loaded after being requested, and no file can be used before the load is complete.
That is what is causing the delays mentioned here.
One solution is to reduce filesize - the smaller a file, the faster it will be loaded.
In fact there should be a folder in your prgogam or DLC-Area where recompressed and smaller versions of some default resources are stored, and if you make your own resources (like animation sheets) you should experiment with different compression rates to get the files as small as possible without loosing too much quality.
Another solution is a very careful use of one of the preloaders mentioned above - the problem here is that there is only a limited amount of RAM (depending on device), and you need to specify which files to preload and which not, because if you're preloading too many files then you'll get lag from the other side or might loose the first preload (as the garbage collector drops the olders files from cache when its limit is reached)
My image loading issues have to do with Quasi's quick test feature of a plugin, which omits loading many files to speed up the process... Unfortunately even loading of important files like faceset used in the menu though.
However, the battle animations lag issues we are discussing here aren't made by images... But by third party plugins. So a preloader core won't solve this issue.
It's all these notetags, plugins reading notetags and caching of the animation that make the animation be very laggy the first time, but smooth afterwards. So the only solution to that would be either to limit the code or buy a more powerful machine.
To limit the code is pretty hard when you're already trying to use the lowest amount of code possible. But I will have to think differently : I will more often use the default animations, in order to make disappear some lag in battle.
Or maybe you can try to integrate some plugins directly into the core scripts. I'm not an expert, but it could help, because you would save lots of space and time consumed by loading third party plugins, referencing things found in other plugins and aliasing all sorts of stuff (although now that I look at it, there would be lots of copyright issues with it... And custom parameters would be hell.
Or maybe reduce other visual stuff, like status window.
The fact is : I don't have a status window, there are only HP gauges that appear when a target loses HP, I have all my windows at 0 opacity, etc. And still, the game freezes for 1 second at each animation.
Integrating plugins in the core scripts is something I am afraid to do, because I had a lot of problems with updating recently and other things. I always had a backup but still, I don't want to touch at the rpg files in my game anymore for that reason.
I am using Yanfly's plugin Visual HP Gauge that provides the gauges itself. So I am not using pictures for the gauges.
But for the filesize of my animations, I don't know. I will search about that, but I am using the pictures provided by makers on this forum. I have a lot of them (I will remove the non-used files soon) but even the basic animations provided by the engine make the game lag.