Author Topic: Play music to players  (Read 7962 times)

Agresszor

  • Posts: 12
  • Turrets: +0/-0
Play music to players
« on: October 28, 2008, 08:57:45 am »
How can i play music as admin to players? You know some funy mp3.

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Play music to players
« Reply #1 on: October 28, 2008, 11:15:36 am »
Thankfully you can't
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

  • Posts: 573
  • Turrets: +41/-35
Re: Play music to players
« Reply #2 on: October 28, 2008, 05:13:27 pm »
You can use voip, but only those who have voip enabled will hear it (and probably ignore you).
I MINE FULL WEREWOLFES
NOT SUCH HIPPIE THINGS  >:(

Lava Croft

  • Guest
Re: Play music to players
« Reply #3 on: October 28, 2008, 05:14:21 pm »
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

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
Re: Play music to players
« Reply #4 on: October 28, 2008, 06:05:55 pm »
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

  • Posts: 54
  • Turrets: +2/-3
    • Tremulous Game Spanish Community
Re: Play music to players
« Reply #5 on: October 28, 2008, 06:10:26 pm »
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.
« Last Edit: October 28, 2008, 06:14:21 pm by TheLuciferSausage »

Syntac

  • Posts: 841
  • Turrets: +118/-104
    • Syntac's Stuff
Re: Play music to players
« Reply #6 on: October 28, 2008, 08:39:52 pm »
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.
« Last Edit: October 28, 2008, 09:03:33 pm by Syntac »

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Play music to players
« Reply #7 on: October 28, 2008, 09:32:44 pm »
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.
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

  • Posts: 841
  • Turrets: +118/-104
    • Syntac's Stuff
Re: Play music to players
« Reply #8 on: October 28, 2008, 09:36:08 pm »
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.
« Last Edit: October 28, 2008, 09:38:45 pm by Syntac »

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: Play music to players
« Reply #9 on: October 28, 2008, 10:59:59 pm »
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

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Re: Play music to players
« Reply #10 on: October 28, 2008, 11:51:06 pm »
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

  • Posts: 12
  • Turrets: +0/-0
Re: Play music to players
« Reply #11 on: October 29, 2008, 05:56:08 pm »
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

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Play music to players
« Reply #12 on: October 29, 2008, 07:36:57 pm »
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

  • Posts: 35
  • Turrets: +2/-1
Re: Play music to players
« Reply #13 on: October 29, 2008, 11:36:50 pm »
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: CitRoN
Muuuuuuuuuh ]={:}

Agresszor

  • Posts: 12
  • Turrets: +0/-0
Re: Play music to players
« Reply #14 on: October 31, 2008, 01:54:41 pm »
Ehh  :-\ i dont know why so complicated this. Well thanks all.

Syntac

  • Posts: 841
  • Turrets: +118/-104
    • Syntac's Stuff
Re: Play music to players
« Reply #15 on: October 31, 2008, 10:03:55 pm »
Simple answer: Because it isn't possible, nor should it ever be.

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: Play music to players
« Reply #16 on: November 01, 2008, 10:05:37 am »
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

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
Re: Play music to players
« Reply #17 on: November 01, 2008, 11:05:19 am »
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

  • Posts: 841
  • Turrets: +118/-104
    • Syntac's Stuff
Re: Play music to players
« Reply #18 on: November 01, 2008, 04:54:32 pm »
I was talking about streaming audio, but meh.

snb

  • Posts: 422
  • Turrets: +15/-265
Re: Play music to players
« Reply #19 on: November 02, 2008, 07:46:17 pm »
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
On Topic:
My favorite type of metal has to be whatever type Demons and Wizards fall into.

tyranis

  • Posts: 44
  • Turrets: +3/-5
Re: Play music to players
« Reply #20 on: November 02, 2008, 09:25:54 pm »
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

  • Posts: 81
  • Turrets: +12/-2
Re: Play music to players
« Reply #21 on: November 03, 2008, 09:46:51 pm »
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.