Sound Events Manager plugin

ManiaControl, the completely new designed and easy to use controller managing all your Maniaplanet server.

Moderators: Wabbitface, Jocy, steeffeen, NADEO

User avatar
insomnia-yamyam
Posts: 213
Joined: 05 Sep 2011, 04:59
Contact:

Re: Sound Events Manager plugin

Post by insomnia-yamyam »

Lumpik wrote:@ yamyam :
It would be great if you become my hardest (and best) tester !
Don't say this too loud and early, i am a bastard beta tester and 100% a perfectionist (as you may see in SMART or at least the interface layout i posted above) :D
Lumpik wrote:preload routine :
My plugin don't use this. As you said, each player have to download the sound the 1st time it should be played to be able to hear it on the 2nd time.
I don't know if preload is possible with ManiaControl and i don't know what is the most annoying between :
- preload all sounds + music : can be very heavy (max 43 sounds without counting music), will generate lags during a while
- don't hear sound the 1st time it should be played
I think I prefer the 2nd option, as it's not so annoying imo and coding a preload would probably add me complexe work ;)
But if many players says they would prefer to preload them, i'll try to do this.


I can confirm that if a player joins the server the first time, it will lag for several seconds, but then 100% of all loadscreens, sounds, picutures, signs, and so on, are instantly available to the player as already cached. We have done this in SMART on purpose because we have a lot of sound which are important to be heared if played the first time(!!). We also implemented some feature so that every soundfile fot his exact playtime in the config to prevent replays or loops. Don't know if you got that already included in your plugin.

So if you want, you can check the code of SMART and copy/adapt the preload feature for sounds - you can make it OPTIONAL in the config, so everyone can decide if to use preload or not. I would appreciate preloading defenitly! (as i need it, i can show you on our server soon, then you will understand why it is important to me).


About the current/possible crash someone reported:

I will install yiur plugin in about 1-4 hours and test it, will be a clean install so i can tell you if i will also have a crash or not.

See/Listen/Read you soon ... :thumbsup:
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
Lumpik
Posts: 41
Joined: 04 Jan 2015, 22:00
Contact:

Re: Sound Events Manager plugin

Post by Lumpik »

We also implemented some feature so that every soundfile fot his exact playtime in the config to prevent replays or loops. Don't know if you got that already included in your plugin.
Nop, it's not done in my plugin. It could be but i don't understand why you need to set a duration on each sound.
Why there would be replays / loops you didn't expect ?
I've never tried to send a manialink with a timeout. Setting a timeout prevents this sound to be stopped by another sound ? If so, the next sound will wait the previous sound to finish before playing ?

About the preload option, if i understand your sources, when a player connects or when the plugin initializes, you send to the player (or each player) a ManiaLink which contains all sounds you have but it will last only 10ms ?
So if the player didn't have the sounds, he will download them. And if he already had them, he will download nothing but he'll receive something (all sounds at the same time ?) during only 10ms. That's right ?
I've never tried to send a manialink which contains many sounds. It should work i guess.
As it looks very easy to dev, i'll probably test it and add this preload by default. Finally, I prefer to see people downloading sounds for a while but only once and before they start to play than they have a lag every time they have to download one single sound (and they won't even hear that sound).

I would like to see why preloading is so important to you. And maybe you'll give me some new ideas during this presentation ;)
So add me on Shootmania please yamyam : skapik.

About the ManiaControl crashes of Search44, SSM swinn told me he had no problem to upgrade his previous version of SEM, from v1.03 to v1.04.
I'm waiting for Search44's ManiaControl logs or more explanations to understand what's wrong.
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: Sound Events Manager plugin

Post by undef.de »

kremsy wrote:But I don't see the big problem in the Sound Manager as you get it anyway the second time the sound get sent, so it makes not really sence to preload, you miss it maximum one time.
But it can lag in this case when the client has to get files the first time on a "headshoot" or whatever. The best solution is to preload.
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
Lumpik
Posts: 41
Joined: 04 Jan 2015, 22:00
Contact:

Re: Sound Events Manager plugin

Post by Lumpik »

Well, i'm using some music files of 3 Mb in ogg. I've converted a full album, which means 12 files of this size :twisted:
I don't think i'll force people to download all those files. Maybe just one or two, I don't know yet. I have to think about what i want to do with the music : full music player or just few music allowed.

But for classical sounds played on events, the maximum size is 806 Kb for default sounds. Most of files are around 300 Kb, which is quite small.
But SEM can play many sounds and all default sounds are something like 5 Mb.
And note that admins can set their own sounds, without any size imitation. So it can easily be more than 10 Mb in some servers !

So, should i preload sounds or not ?
User avatar
Chris92
Translator
Translator
Posts: 950
Joined: 15 Jun 2010, 13:22
Location: Vilshofen, Germany
Contact:

Re: Sound Events Manager plugin

Post by Chris92 »

You'll never want the clients to lag midgame, especially in an FPS since in FPS a lag of a second can decide between surviving and dying. Preload is the best idea.
Check out my Personal Twitter account!
User avatar
insomnia-yamyam
Posts: 213
Joined: 05 Sep 2011, 04:59
Contact:

Re: Sound Events Manager plugin

Post by insomnia-yamyam »

Lumpik wrote:
We also implemented some feature so that every soundfile fot his exact playtime in the config to prevent replays or loops. Don't know if you got that already included in your plugin.
Nop, it's not done in my plugin. It could be but i don't understand why you need to set a duration on each sound.
Why there would be replays / loops you didn't expect ?
I've never tried to send a manialink with a timeout. Setting a timeout prevents this sound to be stopped by another sound ? If so, the next sound will wait the previous sound to finish before playing ?
  • I don't remember exactly why we added playtime in ms to the sound config, but i remember it was very important because we had some heavy problems with loops or playbacks in some case and it was very annoying. After we have added playtime, all problems were solved!
  • Also after we have added a parameter <blockothersounds>true/false</blockothersounds> to prevent users to skip important sounds (like a server rule sound, or warning, or explanation sound) by just playing an other sound!
  • Additionaly we have addded parameter <preload>true/false</preload> to every sound event, so an admin can decide and setup if a file should be preloaded because its important or not, to reduce lag & load on player join if many files are configured.
Here an example configuratin of ONE soundfile:

Code: Select all

	<sound>
		<event>AdminWarnedPlayer</event>
		<url>AdminWarnedPlayer.ogg</url>
		<duration>5511</duration>
		<preload>true</preload>
		<blocktime>0</blocktime>
		<blockothersounds>true</blockothersounds>
	</sound>
This simple example also shows WHY it is so important for me (and sure for others too), that the sounds are available at the very first play and also are blockable for other sounds. First: In case an admin warns a player because he insults other or broke a server rule, it makes no sense at all if he will NOT hear it at the very first time! I can not warn a player two times jst to get him hear the sound finally :o This is just an example, there are many other files which need to be heared on first play. In this case example you also see why it is important why it needs a blockothersound-variable, as this sound of 5511ms does not have to be interupted by another sound.
Lumpik wrote:About the preload option, if i understand your sources, when a player connects or when the plugin initializes, you send to the player (or each player) a ManiaLink which contains all sounds you have but it will last only 10ms ?
So if the player didn't have the sounds, he will download them. And if he already had them, he will download nothing but he'll receive something (all sounds at the same time ?) during only 10ms. That's right ?
i guess so, havn't had a look into the code several years :? But basically yes. If a player joins, he will preload every soundfile and also every loadscreen (preload was also implemented in our loadscreen plugin) into his cache. So everything is instantly available if called/used. Of course. If a player joins the server the very first time (or if he cleared his cache manually), he will have a heavy load for some seconds while preloading, but then 100% of all problems are solved. No more loops of sound, no more lag during game because player need to load soundfile on event and of course ever sound was available and hearable already on 1st play!
Lumpik wrote:I would like to see why preloading is so important to you. And maybe you'll give me some new ideas during this presentation ;)
So add me on Shootmania please yamyam : skapik.
I already showed you on the above example why it is so important to me. I also just sent you my whole sounds config file with about 185 sound events on i have on our shootmania servers! Please check your private messages. :thumbsup:

While checking the config and sound events, and while hearing the sounds, you will understand why preloading and blocking is so much important in my case. All configed soundfiles are still available so you can listen to them. Please keep the config file and sounds destinations confidential and secret as we have invested a lot of money into all 185 event-sounds. If you hear them, you know why. :D

I have added you on Maniaplanet :thumbsup: But you will currently see me most time busy at work on our "new" shootmania server, which will be not available for public until im done.
kremsy wrote:But I don't see the big problem in the Sound Manager as you get it anyway the second time the sound get sent, so it makes not really sence to preload, you miss it maximum one time.
Right, and thats (in some of my cases) exactly one time too late. :lol:
undef.de wrote: But it can lag in this case when the client has to get files the first time on a "headshoot" or whatever. The best solution is to preload.
That is 100% correct! :thumbsup:
Chris92 wrote:Preload is the best idea.
That is 100% correct! :thumbsup:
Lumpik wrote: Of course you can ask me new features ! My wish is to have the best Sounds plugin ever in ShootMania :D
Just ask on this thread and i'll write in my TO DO list.
Lumpik, you need to be honored to have such a great goal and thanks for all your efforts. But your goal is reached very fast and easy: Just "copy" the SMART sound plugin with all its features and options and you will have the best sound plugin possible for shootmania. Trust me, vni and me invested 2012 several hundred hours, if not even thousands, to make SMART as excellent as it was, including the sound events and plugins. It had all everyone would need to make dreams true and i had it running oin several server for several months in full stress mode and under heavy load scenarios, all working proper and perfect! ... So if you wanna have the perfect and best working sound plugin, as simple as it sounds, make it 100% identical to the SMART sound plugin ... goal reached :D

I had some work to do and had some delay in server work, so i hadnt time yet to install and config your plugin. Maybe it already can do what i wish, or most of it (excluding preload function and block feature). But i will start soon, probably this night. so i can give you first feedback and constructive input this night or tomorrow. Maybe you learn some german and join our teamspeak server, would make it easier and faster and more comfortable to work together :mrgreen:
GermanINSOMNIAClan!
Multigaming Fun-Clan since 1998!
» www.I-N-S-O-M-N-I-A.de «

Visit our TM2 and SM Clanserver or download the INSOMNIA TM2-Trackpack or SM-Mappack !
You also find us at both Mania-Exchanges - search "German INSOMNIA Clan"
User avatar
Lumpik
Posts: 41
Joined: 04 Jan 2015, 22:00
Contact:

Re: Sound Events Manager plugin

Post by Lumpik »

OK, so i'll preload sounds.

"duration" parameter seems to be usefull for 2 reasons :
- fix SMART bugs for loops and playbacks
- mandatory with the "blockothersounds" parameter
"blockothersounds" parameter is great but it's SMART specific. I don't know if ManiaControl / ManiaPlanet can do the same, i.e. block all other sounds while one sound is playing. Kremzy ?
"preload" is probably less usefull but why not. FYI, all 185 sounds have preload=true.

About your XML file, does SMART allow to modify all parameters of all sounds ingame ?
This means 185 sounds * 5 parameters = 925 parameters ^^
If not, how admins can update their configuration ? By updating the XML file stored in their server, then restarting SMART maybe ?

About SMART and SMART sound plugin : there's great ideas inside the SMART sound plugin, such as previous parameters i've mentionned and using a XML file.
But it's mainly SMART specific. So all this features won't be able with ManiaControl or needs to be coded in ManiaControl / SEM plugin.
For example, in your XML file, you have an event "AdminConnect" which is a preexisting SMART event. In my plugin, i can only get a "PLAYERCONNECT" event and then, check if the player is admin. This means more work for me.
Other examples, you have events like "DonationComplete", "KarmaVote1", "AdminSkipMap", etc... which i think they don't exists in ManiaControl. The actions exists but i don't think they send an event. So i can't get information about those events in my plugin.
To resume, your SMART sound plugin (php + xml) is VERY simple (77 lines) but it use a SMART engine which can handle many more events than ManiaControl at the moment. So my plugin won't be able to send as many sounds as your SMART sound plugin.
Btw, i don't want to denigrate ManiaControl. Kremsy and his friends have done a great job and ManiaControl is not just sending events. There's so many sides of this controler i even don't know about it.
In conclusion, to make SEM plugin as good as SMART Sound plugin, it will need work on ManiaControl side, which is probably not their priority. So i'll try to do my best but yamyam, don't expect too much about SEM plugin, especially regarding to SMART Sound plugin ;)

About Teamspeak, i don't speak German but i can try to speak English if we need to talk instead of writing.
Your TS server seems busy (http://www.i-n-s-o-m-n-i-a.de/clan/teamspeak/), could you send me the IP of your server plz ?
Post Reply

Return to “ManiaControl”

Who is online

Users browsing this forum: No registered users and 2 guests