1. When a player logs in, it isn't detecting the area and is not playing the music because of that. They have to walk off of the /area and back on to it to make the music play. I've tried some stuff like so to get it to work, but to limited success.
var/area/Music = locate(/area/Music) in loc
if(Music)
src<<"good"
Music.Entered(src)
else
src<<"not good"
2. The first time a player enters an area and music begins to play, it freezes their screen for like 0.4-0.8 seconds. It only occurs on the first time that music file is played. After that, you can walk on and off of the area to create the music with no freezes.
One more question, is using sounds in a game something that should generally be avoided? And does the format of a sound file have any effect on performance? Thank you!
#2 is causing lag because the player has to download the music resources, that's unavoidable. Once it's downloaded, it wont happen again. (Unless they clear their cache)
#3 I personally use ogg formats, but that's just my preference. 90% of byond users keep their sounds disabled anyways, so it's really up to you.