News:

Come Chat with us live! Learn how HERE!

Main Menu

Play music to players

Started by Agresszor, October 28, 2008, 07:57:45 AM

Agresszor

How can i play music as admin to players? You know some funy mp3.

David

Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Asvarox

You can use voip, but only those who have voip enabled will hear it (and probably ignore you).
Quote from: J3lackStar on July 14, 2011, 09:14:42 PM
I MINE FULL WEREWOLFES
NOT SUCH HIPPIE THINGS  >:(

Lava Croft

You need to be able to execute the 'music' command for all clients, while all the clients also need to be in possesion of your 'funy mp3'.

Should not be too hard to code.

Amanieu

1) No mp3 support in clients (except fsm-trem)
2) You can't make a client play music remotely
3) Yeah voip would be the only way, but then you don't get the whole population
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

TheLuciferSausage

#5
Quote from: David on October 28, 2008, 10:15:36 AM
Thankfully you can't

Indeed!! ;D

Some reasons:
Bandwidth - Streaming a full version of a song (4-5 minutes) takes up huge resources and LAGS the game.
Taste In Music - Everyone has different tastes in music. What songs you like, others may detest. I know, I know, it's hard to believe not everyone loves Barry Manalo as much as you do, but the last thing you want to do is drive people away before they even play at your server.
Music Already Playing - Now days, people spend a lot of time on their computers. Because of this, they often have music playing from Cd's, MP3s, Internet radio, etc. on their computer. How annoying it may be when you enter a server and it starts playing music that mixes in with your music? Nothing fun about trying to listen to two tracks at the same time. The quick fix will be to leave your server.
Legal Issues - Do you have the legal right to broadcast the song you want play as background music? Yeah, no RIAA will come see if your server is playing copyrighted music, but it's not nice to do that anyway.
Not giving the right to decide - Can players decide to STOP your music if they want, or pause it, or turn the volume a little bit down? They'll need to do a callvote lol
Extracted from ezinearticles.com/?Why-You-Should-Avoid-Background-Music-on-Your-Website and adapted for Trem servers.

Syntac

#6
It's possible to stream music over the connection with some creative net code, but certainly not a good use of the developer's time. Also, any "funny MP3" you play will get very old very quickly.

Oh, and you'd have to use UDP to transfer the audio with any sort of speed. For many people, this would make it impossible to hear anything but the occasional lucky packet.

David

Quote from: Syntac on October 28, 2008, 07:39:52 PMOh, and you'd have to use UDP to transfer the audio with any sort of speed. For many people, this would make it impossible to hear anything but the occasional lucky packet.
If you have notable packet loss then you need to fix your connection.  Just because its called "best effort" doesn't mean its shit.  I would guess well over 99% of packets get through fine.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

Syntac

#8
You're very right about that, but the fact remains... There are people whose intarwebz are that borked.

Those with high pings might also have choppiness issues.

gimhael

You could (theoretically) put the sound file into a custom pk3 and then add an event that starts to play the music. That would eliminiate all the streaming issues, but of course all your clients have to download the pk3 and you can only play the song(s) that you packed into it.

Paradox

Install Shoutcast DAS on server.
Install Shoutcast DSP client on, well, client.

Tell people to listen to ipaddress:8000 or whatever you have it configured to.

∧OMG ENTROPY∧

Agresszor

Well i think the custom pk3 will be the solution. How make a simple pk3 what only contain the necessary sound files? And what type this simple wav? And how can force the clients to download this who join to my server? And how can i play them with a single bind? In call of duty 2 i meet many servers with this solution.

David

A pk3 is just a zip.
But sounds won't work, you needs a custom QVM too so you can play them.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

kangounator

You'd need a qvm with a music <name> command that'd play the given music and a pk3 with that musics in it.

Anyway, spend your free time with something else, unless you have too much of it.
Quote from: CitRoNMuuuuuuuuuh ]={:}

Agresszor

Ehh  :-\ i dont know why so complicated this. Well thanks all.

Syntac

Simple answer: Because it isn't possible, nor should it ever be.

gimhael

Quote from: Syntac on October 31, 2008, 09:03:55 PM
Simple answer: Because it isn't possible, nor should it ever be.

Sorry to disappoint you, but every client and cgame I know has this already built in, all it needs is a new command on the server to change the background music.

Amanieu

Now that I think about it, gimhael is right, all you need to do is make them download the music in a pk3 and set some configstrings.
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

Syntac

I was talking about streaming audio, but meh.

snb

lol you can make them hear music with them not bieng able to mute you, its quite easy a few modifications to the hlss thing for the quake engine and your ready to go. of course they can still boot you but i think that causes them to hear the last ten seconds of the song to reapeat untill they re-joinn or new round or map.
Half Life head crab by the way
Quote from: Annihilation on November 26, 2008, 03:21:48 AM
On Topic:
My favorite type of metal has to be whatever type Demons and Wizards fall into.

tyranis

A custom pk3 could be used, then of course no one in their right mind would play on your server with that kind of garbage.

Einstein

Again, while I agree that this is a REALLY BAD IDEA 99% of the time, it is possible; if you wanted a "tune-of-the-day" or an aural connection message when you logged on, you could autodownload a pk3 that overwrote the previous one and allowed you to play a .wav file. If you made it loop, made it arbitrary, made it annoying, or made it pointless, though, you're just asking people to ignore your server forever and then some.