• All, I am currently in the process of migrating domain registrations. During this time there may be some intermittent outages or slowdowns. Please contact staff if you have any questions.

Awkward Silence in Gaming: How Loading Screen Music Can Save the Day

PS_VITA

Active member
I've recently been observing people playing the mod I just completed.

Alright, so in the gaming world, there's this kinda annoying thing that happens a lot.
You know when you're totally on fire, acing those levels, and the excitement is through the roof?
But then, out of the blue, you hit a loading screen, and it's just mute blank screen with a loading word and dead silince.
Those 5 to 20 seconds (depending on the level) feel like they're dragging on forever.
What's worse, your friends or other players might bounce, get bored, or start messing around with their phones.
It's like the gaming party just got unplugged, and it's a major bummer not to mention how awkward it is.

It's like going from a wild concert to crickets.

And here's the kicker: our attention spans are shorter than ever, thanks to all the distractions out there.
So when the game goes all silent movie on us, we can't help but look for something else to occupy our brains, like scrolling through social media or whatever.
It's not that we want to ditch the game – it's just that we need some action to keep us hooked.

So here's the big question:
What if we could have some cool music jamming during those loading screens?
It could keep the energy alive, so you're not stuck in that weird silence zone.
It might help you stay pumped and locked into the game instead of drifting off.
I feel like Ive attempted this years ago but I never got around to implementing music on a load screen or at-least a short loop.
Anyone out there can relate?
 
I've recently been observing people playing the mod I just completed.

Alright, so in the gaming world, there's this kinda annoying thing that happens a lot.
You know when you're totally on fire, acing those levels, and the excitement is through the roof?
But then, out of the blue, you hit a loading screen, and it's just mute blank screen with a loading word and dead silince.
Those 5 to 20 seconds (depending on the level) feel like they're dragging on forever.
What's worse, your friends or other players might bounce, get bored, or start messing around with their phones.
It's like the gaming party just got unplugged, and it's a major bummer not to mention how awkward it is.

It's like going from a wild concert to crickets.

And here's the kicker: our attention spans are shorter than ever, thanks to all the distractions out there.
So when the game goes all silent movie on us, we can't help but look for something else to occupy our brains, like scrolling through social media or whatever.
It's not that we want to ditch the game – it's just that we need some action to keep us hooked.

So here's the big question:
What if we could have some cool music jamming during those loading screens?
It could keep the energy alive, so you're not stuck in that weird silence zone.
It might help you stay pumped and locked into the game instead of drifting off.
I feel like Ive attempted this years ago but I never got around to implementing music on a load screen or at-least a short loop.
Anyone out there can relate?
As a suggestion you can try the loading.c event and put playmusic function inside. If I'm not wrong the music will play normally, you will just need a simple flag to play the music once.
 
As a suggestion you can try the loading.c event and put playmusic function inside. If I'm not wrong the music will play normally, you will just need a simple flag to play the music once.
Would a sfx work as well?
like a simple .wav file with a simple beat (that loops)- similar to
The DD NES "Mission 1" loading screen? Are there any examples of how the whole thing is set up?

For example does the loading.c file go in the same folder as stage 1?
and what does the code look like inside the file?

Sorry I've never used Loading.c at all.
 
Here's what loading.c is like in mine.

C:
void main()
{
    void s;
    void value = getlocalvar("value");
    void max = getlocalvar("max");
    if(max==1){
        return;
    }else{}

    void percent=value*100/max;
    percent%=++percent;

    void dot=percent%3;
    if(dot==0)
        s=".";
    else if(dot==1)
        s="..";
    else
        s="...";

    drawstring(130,30,4,"WARNING");
    drawstring(9,70,4,"THIS IS NOT PRODUCED UNDER LICENCE OF");
    drawstring(130,110,4,"CAPCOM");
    drawstring(63,212,0,"Loading Models...");
    drawstring(177,212,0,percent+"% Complete"+s);
    drawbox(0,230,320,15,11,rgbcolor(0,122,133),0); // Shadow bar
    drawbox(0,230,percent*320*0.01,15,15,rgbcolor(0,233,233),0); // Loading bar
    
    //playwebm("data/scenes/demotest.webm", 0);

//    void Beat = loadsample("data/sounds/beat1.wav");
//    playsample(Beat, 0, 100, 100, 0, 1);
    
    /*
    drawline(); //drawline(x1,y1,x2,y2,z,color,alpha);
    drawbox();
    */
}

Having the music or sound playing without a flag which Kratus mentioned, is annoying.
 
Here's what loading.c is like in mine.

C:
void main()
{
    void s;
    void value = getlocalvar("value");
    void max = getlocalvar("max");
    if(max==1){
        return;
    }else{}

    void percent=value*100/max;
    percent%=++percent;

    void dot=percent%3;
    if(dot==0)
        s=".";
    else if(dot==1)
        s="..";
    else
        s="...";

    drawstring(130,30,4,"WARNING");
    drawstring(9,70,4,"THIS IS NOT PRODUCED UNDER LICENCE OF");
    drawstring(130,110,4,"CAPCOM");
    drawstring(63,212,0,"Loading Models...");
    drawstring(177,212,0,percent+"% Complete"+s);
    drawbox(0,230,320,15,11,rgbcolor(0,122,133),0); // Shadow bar
    drawbox(0,230,percent*320*0.01,15,15,rgbcolor(0,233,233),0); // Loading bar
  
    //playwebm("data/scenes/demotest.webm", 0);

//    void Beat = loadsample("data/sounds/beat1.wav");
//    playsample(Beat, 0, 100, 100, 0, 1);
  
    /*
    drawline(); //drawline(x1,y1,x2,y2,z,color,alpha);
    drawbox();
    */
}

Having the music or sound playing without a flag which Kratus mentioned, is annoying.
Cool, so this is custom loading screen but without any sound.

What would a simple short music loop look code like within the loading.c ?


Code:
void main()
{
    // Load the music file
    void Music = loadsample("music.wav");

    // Start playing the music
    playsample(Music, 0, 100, 100, 1, 1);
   
   
}
Something like this ^?
 
What would a simple short music loop look code like within the loading.c ?
It would sound distorting if you put playmusic. It's like listening to it from a scratched CD in the beginning. Like Kratus said, you need a flag for it, but I don't know how to create a flag for stopping from an annoying noise.

Using playsample loops infinitely. Plus, it's annoying, noisy, distorting, and not smooth. Kinda like a scratched CD. You can decrease its volume in loading.
 
Last edited:
You can create a simple flag check like this:

C:
while(getlocalvar("musicPlayed") == NULL())
{
    playmusic(file_path, loop, offset);
    setlocalvar("musicPlayed", 1);
}

After that you can clear this flag in the level.c event in order to run again in the next loading.
 
You can create a simple flag check like this:

C:
while(getlocalvar("musicPlayed") == NULL())
{
    playmusic(file_path, loop, offset);
    setlocalvar("musicPlayed", 1);
}

After that you can clear this flag in the level.c event in order to run again in the next loading.
Hi @Kratus

Do you mind taking a look at this post I made Oct 18, 2020,
I had forgotten I attempted this along time ago.
I just never got around to making it work.

Could you test it on your end not with a song but by using DCurrent .wav method as he described it in 6th post?
Even till this day I cant seem to get the sound to play anywhere but the game loading screen. not anywhere else.

Thanks
 
@PS_VITA

i would go a bit further and try to feature art frames fading in and out as the data loads or somethng similar to "cinema" / slideshow stills for the next level.

I am not familiar with your project , but it seems from what you mention that the loading screens seem to be happening within the same level? if so that is indeed very distracting.

in my project i dont really understand why there seems to be no loading between levels , i suppose it is becasue the only loading screen i get is the initial one and it is long... and maybe it is a relatively simple game.

anyhoo, i think music is not enought, visuals might also be needed and if they are varied and randomized might also add an incentive for players to pay attention.

as far as visuals, a static image or frame is not enough, & a video or even featuring entities for complex real time animations is what i would like to see

hell, in case of 4 player games visuals and music based on player rankings can make the loading medias even more interesting...
 
Last edited:
Hi @Kratus

Do you mind taking a look at this post I made Oct 18, 2020,
I had forgotten I attempted this along time ago.
I just never got around to making it work.

Could you test it on your end not with a song but by using DCurrent .wav method as he described it in 6th post?
Even till this day I cant seem to get the sound to play anywhere but the game loading screen. not anywhere else.

Thanks
@PS_VITA The way to play musics in the loading screen is the same as I posted before, you must have a loading.c script file and put the following code inside it

You can create a simple flag check like this:

C:
while(getlocalvar("musicPlayed") == NULL())
{
    playmusic(file_path, loop, offset);
    setlocalvar("musicPlayed", 1);
}

After that you can clear this flag in the level.c event in order to run again in the next loading.
 
Last edited:
Hi @Kratus

Below is the loading.c script I have and the "menu.ogg" music can be heard when the game loads for the first time.
Code:
void main() {
while(getlocalvar("musicPlayed") == NULL())
{
    playmusic("data/music/menu.ogg",1);
    setlocalvar("musicPlayed", 1);
}
}

However when I select my character and begin stage 1, practice stage or whatever other mode , the "menu.ogg" can no longer be heard whenever the game loads the next stage.
You mentioned "After that you can clear this flag in the level.c event in order to run again in the next loading."
How can I "clear the flag" as you mentioned?
 
Thank you @O Ilusionista,

And is my first time hearing about endlevel.c .

So I will test this later, but to set the same flag Null on enlevel.c
the code would have to look something like this...

Code:
void main() {
while(getlocalvar("musicPlayed") == 1)
{
    setlocalvar("musicPlayed", 0);
}
}
@PS_VITA The code will look more like this:

C:
void main()
{
    while(getlocalvar("musicPlayed") != NULL())
    {
        setlocalvar("musicPlayed", NULL());
    }
}
 
Back
Top Bottom