1
Programming Questions / Avoidance sometimes Off-Sync
« on: March 06, 2019, 09:09:58 AM »
Hey guys.
Almost done with my Fangame but there is something that is bothering me.
Sometimes when I test my Avoidance Battle they are sometimes not in sync with the music.
I guess it happens because of lag. But seeing other much more visually fancy avoidances in other fangames that don't seem to have this problem, I wonder if there is some magical programming trick they use.
They way I made my avoidances is by having a BG Music in .ogg format play and using a step event with the code
"count += 1"
then doing basically:
"if count = 300
{
//Apples spawn
}
if count = 750
{
//More Apples spawn
}
if count = 3750
{
//Even More Apples spawn
}
"
etc...
Got the timing through trail and error and basic math.
At some points the off sync becomes like a full second. Other times it works fine as intended
Note: My Computer is not really very good at all
Almost done with my Fangame but there is something that is bothering me.
Sometimes when I test my Avoidance Battle they are sometimes not in sync with the music.
I guess it happens because of lag. But seeing other much more visually fancy avoidances in other fangames that don't seem to have this problem, I wonder if there is some magical programming trick they use.
They way I made my avoidances is by having a BG Music in .ogg format play and using a step event with the code
"count += 1"
then doing basically:
"if count = 300
{
//Apples spawn
}
if count = 750
{
//More Apples spawn
}
if count = 3750
{
//Even More Apples spawn
}
"
etc...
Got the timing through trail and error and basic math.
At some points the off sync becomes like a full second. Other times it works fine as intended
Note: My Computer is not really very good at all