ID:174851
 
I have some fantastic wav files as music, and byond allows wav files to be played. The problem is that they are something like 2 megs in size. Aside from the size of the download, will this cause lag problems in the game, or any other problems?

-Dagolar
Dagolar wrote:
I have some fantastic wav files as music, and byond allows wav files to be played. The problem is that they are something like 2 megs in size. Aside from the size of the download, will this cause lag problems in the game, or any other problems?

-Dagolar

They shouldn't cause any latency problems, unless you have the play have a verb and play it to the world.

As any known person could come along and press that verb repeatedly and severely mess with your bandwidth issues ;)

Anyhow, just have it so that people who Entered() a turf/area have the musical files playing, if not, if you wish to use verbs, have it so that only the user of the verb hears it.

I use a load of musical pieces in my projects, none released with appropriate game-play, and they have loads of musical files, thing is, I only allow people to hear the music if they have Entered() specific locations, in the odd occation that I allow people to have a verb to play a musical piece, I only allow the user to hear it.

I am just giving my basic opinion on this, and someone else may have a better and more detailed explanation for you though...

--Lee
In response to Mellifluous
So if you have a wav file for music (2 megs + in size) and you have it so, yes, a person walks into town or something and the music starts playing (that big, fat, 2 meg + wav file) for that player because they stepped on the "teleporter" into town, it will not cause lag in the game...?

-Dagolar
In response to Dagolar
Provided they've already downloaded it, should be fine. Useful thing to note here, though, is to use client.preload_rsc (go look it up if you don't know what it does) so that the host's connection isn't used for downloading that 2MB file. Big uploads can, obviously, slow a connection down quite fast. =)

Once the file is downloaded, it should have no effect on the host and therefore no effect on the game. The only reason for it to cause problems is if the player's computer can't handle the 2MB WAV file, but that's a separate issue.

You do know that you can get around BYOND's lack of MP3 support, right? Use the browser! =) Using Flash apparently works well, or you can just instruct the webpage to play an MP3.