Music Problem

Piero1987Piero1987 Member Posts: 38
edited November -1 in Working with GS (Mac)
Hello, i try to add a music to my game, but when i try the game to game salad viewer the fps it's very low 44, 40, 49...how i can improve it?...how should be the file audio?...bitrate ecc?

Comments

  • xyloFUNxyloFUN Member Posts: 1,593
    Hey Piero,
    is it a song you are adding?
    Did you import it as sound or song?

    I use mp3 files, mono, bit rate of 320 and when I drag them into GS, it will convert them for me (or I do that with Audacity and save an .ogg file right away)

    Let us know how big the sound file is?
  • Piero1987Piero1987 Member Posts: 38
    the file it's stereo, and i choose 92 Kbs...it's big 2.2MB, and the song it's length 3 minutes...i import like song...
  • xyloFUNxyloFUN Member Posts: 1,593
    good! Song import was the right choice.

    Which attribute do you use?

    Play "Sound" or play "Music"?

    For an audio file any longer than a few seconds, play music is the right choice :)
  • Piero1987Piero1987 Member Posts: 38
    i choose play music...:)...but i don't understood why the frame rate it's too low...
  • xyloFUNxyloFUN Member Posts: 1,593
    just to eliminate the audio file, let's isolate it for a moment?

    make a new scene,
    import the audio just as you did and watch the framerate.

    If there should be something wrong with the file (which is possible, but I don't expect it) than you can fix it and if not, you need to optimize your game where ever you can.

    Do you have actors that don't need to be visible?
    Do you have "Movable" (under Attributes > Physics) unchecked for each actor that does not need to move.

    Are you instancing your actors or do you use an actor only once?

    How many actors are there in your scene?
  • Piero1987Piero1987 Member Posts: 38
    ok now i try to make the audio file of 32Kbs..the minimum, the file is 750Kb...and the game it's more speed than first, but the frame is however low, i notice that when i destroy my principle actor, the frame return normal 60fps...i just set the actor visible and not visible and movable or not...how i can make it better?...I stress that I'm still doing a template ... so the pictures are still those provissorie with standard colors, I do not want to think about when I'll put the right designs...
  • xyloFUNxyloFUN Member Posts: 1,593
    ok, than what you could do is find the "name" of the template" and post it so that others, who have downloaded it too can tell you what to do and how to improve.

    Unfortunately, I don't make or play games ....
  • Piero1987Piero1987 Member Posts: 38
    ok tanks, what u mean when u write, "Are you instancing your actors or do you use an actor only once?"...
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    try changing your sounds to mono
  • quantumsheepquantumsheep Member Posts: 8,188
    JohnPapiomitis said:
    try changing your sounds to mono

    This!

    Also, just for reference, an enemy I have plays a sound file when it enters the scene. This would create a 'lag' as the sound was imported.

    By playing all sounds in the scene at 0 volume when the scene starts, this problem was eliminated!

    Hope that helps in case you have issues with sound files later!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • Piero1987Piero1987 Member Posts: 38
    thanks, but i have to creat a new invisible actor that play music, or i can associate the music at my principle actor?
  • quantumsheepquantumsheep Member Posts: 8,188
    I use a 'controller' actor that appears in every game scene. Useful for keeping track of scores/resets etc etc. I put it in that :)

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.