Bug, glitchs, At least I think it is...

Binel

Veteran
Veteran
Joined
Aug 22, 2017
Messages
38
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
Well, let me tell you all the details:

I was trying to get a plugin that allowed me to use idle animations and have more char frames to animate. Well, I used Galvs "Character Frames and CF Step SE MV" for more frames and it worked fine.

Then, I used his other plugin (that is compatible) "Character Animations MV", it makes the "steps" never stop so you could use an idle animation like "breathing". It worked but that was not what I was looking for. I wanted my actor in the same position when idle BUT from times to times, an quick animation would trigger (for example: turning the head to looking around).

So, to resolve this I make the sheet that is constantly moving all in the exact same place, so they appear to be not moving and used a resource in his plugin to activate a common event from time to time: a common event were I "change actor image" to another sheet and since the constant "stepping" of the plugin would continue, the movement would happen naturally; wait some frames ; then change back to the original sheet of the char standing still. Perfect.

It worked, BUT, 2 problems occurred:

1 - When I play for the program to run, the FIRST time the sheets exchange, a invisible frame (of the size of the char) blinks. Its very fast but its there. But the rest of the exchanges between the 2 sheets will happen without this glitch. This error will only happen again if I close the game and press play again. The glitch will happen only the first time it exchange the sheet. The rest of the time, the exchanges back and forth are fine.

2 - For some reason, when I use the plugin of more animations ("Character Animations MV), only with this one, all the times I move with the mouse, the char becomes invisible. Using the arrows works fine.

I tried another plugin (extramovementframes), with this one I have more frames and I can dictate what will be the idle and if it will be part of the walking animation. In this one I tried to use the common event to exchange the sheet to try to make an similar idle like the first example. I am still having problems to make it workd correctly, BUT I was able to make the program to change the char sheet back and forth between 2 sheets and now: the FIRST time the sheet exchange to animation and the FIRST time the sheet exchange back, the invisible frame happens. The rest of the exhange it works without this glitch. (only If I play the game again)

I am using bigger sheets. I use% like the examples both programers use. I just dont understand why it only happen the first time. I mean, its a weird glitch. And it worries me that I would not be able to exchange sheets in others occasions during the game.

Please, help, it is almost working but this glitch, this invisible blink destroys the whole thing.
 

xoferew

Veteran
Veteran
Joined
Jun 28, 2014
Messages
110
Reaction score
176
First Language
English
Primarily Uses
Doesn't it blink because the graphics are not in cache yet? I have this happen (no plugins) and I got around it by making sure to run the graphic for the first time behind the scenes, like right before I fade in the map.
 

Binel

Veteran
Veteran
Joined
Aug 22, 2017
Messages
38
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
wow, I am a noob, I have no idea that this existed. How do I run the graphics as soon as I play start??
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
I just dont understand why it only happen the first time.
all files need to be completely loaded before they can be used. after that they are cached in case of future use until the cache is cleared.

if you're using large sprites, that means it will take more time to load and that is the time until the sprite becomes visible.


That is not easy to change without other disadvantages. Theoretically you can use a preloader plugin to load files at any time, but if you do that you also cause problems for the garbage collector that should unload a sprite if it is no longer used to clear RAM. If you preload everything without care, you'll create memory overflows that will lag or even crash your game if too many files are preloaded.
So you need to be carefull with what to load when using a preloader.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
523
Reaction score
415
First Language
English
Primarily Uses
RMMV
Here's some code from my own project which loads a bitmap, then executes once the bitmap is actually loaded (I wrote it so the sprites for mog's tools would default to being centered on their hitboxes - if you check an image's size *before* it's loaded the game returns 0).

I think it shouldn't be too difficult to adapt this to load the pose bitmap first, then change poses after it loads.

Code:
           var bitmap = ImageManager.loadCharacter(this.characterName());
           var big = ImageManager.isBigCharacter(this.characterName());
           //bitmaps load asynchronously, so we need to find the height after it loads.
           var thisParticularTool= this;
            bitmap.addLoadListener(function (){
               var ph = bitmap.height / (big ? 4 : 8); //find out how big our y axis is
               thisParticularTool._tool.offsetY = ph/2 -12; //
           })
 

Binel

Veteran
Veteran
Joined
Aug 22, 2017
Messages
38
Reaction score
4
First Language
Portuguese
Primarily Uses
RMMV
IT WORKED!!!! I was till now downloading different preloaders and the one that worked for me was: https://galvs-scripts.com/2017/04/26/mv-image-cache/

Wow that is amazing. The only problem that persists is that command the char to walk with the mouse, they disappear. I will have to find a way to disable walking with the mouse.

But guys, thank you so much by the tips, this loader is amazing. I wont push it, I will be careful. Good to know it exists, I would never image it would be a cache problem.

Thanks you so much! :LZSexcite:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,015
Members
137,563
Latest member
MinyakaAeon
Top