Flicker when switching images

Pazjf

Warper
Member
Joined
Mar 19, 2016
Messages
3
Reaction score
1
First Language
English
Primarily Uses
Hi all,


I've encountered a strange issue when testing out my game and it's quite a major one for me.


My project relies heavily on creating simple 'animations' on-screen by switching between pictures with a 'wait' delay. The game is unusual in the way that most of the gameplay is presented through displaying pictures rather than using the typical RPG maker style, so I really need to find a solution to the problem.


For example:


I display Car1 off screen


It moves onto the screen


I switch between Car1 and Car2 a few times, each with a 0.5 second wait time, to make it look like the car is bobbing up and down.


The car then drives off the screen.


What happens here is that when the car drives onto the screen it's fine, but switching to the Car2 image causes a flicker when the image switches. Oddly, after the first flicker this doesn't happen again. But around 90% of my game uses image switching to change character poses, menu icons etc. So it's really obvious to anyone playing!


Given that the 'animation' works okay after the first flicker I thought I'd try creating a common event that loads the images first, but for some reason that didn't work either. Any help would be appreciated.


Thanks
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,452
First Language
Portuguese
Primarily Uses
The issu is that MV loads images assynchronously. So alwasy you load a new image for the fist time, it will cause a small flicker.


The common event idea you had should work as the image is stored on the cache once it is loaded first. maybe the issue is with how the event is set up.
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
try load the images before use it with this:


ImageManager.loadPicture("name") 
 

Pazjf

Warper
Member
Joined
Mar 19, 2016
Messages
3
Reaction score
1
First Language
English
Primarily Uses
The issu is that MV loads images assynchronously. So alwasy you load a new image for the fist time, it will cause a small flicker.


The common event idea you had should work as the image is stored on the cache once it is loaded first. maybe the issue is with how the event is set up.


You were right. After a bit more testing and trying, I managed to make it work, oddly, by adding a small 'wait' in between loading each image in the common event. For some reason it doesn't work if you don't include a wait command, and the wait also can't be too short or you get an error. Still, looks like it's working now so thanks for the extra information!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top