Popups & sound libary

Discuss API design here.
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Popups & sound libary

Postby Omega_K2 » Fri Dec 21, 2012 11:24 am

Hi,

I think those 2 are the next 2 major necessary python libs, once these are done, most of the more useful libs are there. Especially popups would be great to see, because it doesn't really make sense for plugins to have their own implementation (as it causes problems as soon other plugins override the current popup).

Sound would also be rather useful, since the Engine API is rather complex and also different for CS:GO/CSS :P

Anychance popups are next ? (and sounds)

:D
Libraries: k2tools
Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)
Plugins (game-specific): None atm

If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Fri Dec 21, 2012 11:51 am

Hey Omega_K2,

Popups are currently beeing worked on and should be available soon. For the sounds, I don't see the need of a library because you can directly use IEngineSound or even easier, execute "play" or "playsound" using engine.ClientCommand on the clients of your choice...

L'In20Cible
User avatar
La Muerte
Administrator
Posts: 180
Joined: Sun Jul 15, 2012 1:48 pm
Location: Belgium
Contact:

Postby La Muerte » Fri Dec 21, 2012 1:38 pm

That is great news!

will popups be created in a way so clients can not spam "popup opening commands" to crash servers?
or will a good "way" be provided to use popups safely?
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Fri Dec 21, 2012 2:05 pm

Hey La Muerte,

Actually, there's no plan of a "pending system" once the base is not fully working. But if one is implemented, I think that they will simply take the last spot of the tail if the popup was already sent to the given players.

L'In20Cible
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Fri Dec 21, 2012 5:21 pm

L'In20Cible wrote:Hey La Muerte,

Actually, there's no plan of a "pending system" once the base is not fully working. But if one is implemented, I think that they will simply take the last spot of the tail if the popup was already sent to the given players.

L'In20Cible


ehm i created a class to do menus like this in under 75 lines ? what does the api for poups have since it's sounding like it's taking time? :P
-Tuck
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Fri Dec 21, 2012 6:09 pm

Hey Tuck,

We are not all pro as you are! → L'In20Cible bows at Tuck. :)

L'In20Cible
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Fri Dec 21, 2012 7:40 pm

L'In20Cible wrote:Hey Tuck,

We are not all pro as you are! → L'In20Cible bows at Tuck. :)

L'In20Cible


I just made something simple that overwrites current menu for testing the menus quick, i just read your post as in it would take some time to code :)

but im sure the one you guys are making have many more features :)
-Tuck
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Dec 25, 2012 5:36 pm

I guess my question on the sound module is what would you want that module to do? I have nothing against adding one, but I just need to know what all functionality to look to implement.

Satoon
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Wed Dec 26, 2012 9:16 am

satoon101 wrote:I guess my question on the sound module is what would you want that module to do? I have nothing against adding one, but I just need to know what all functionality to look to implement.

Satoon


maybe in the timer that calls the menu back every x could have an appending list so we could append menus to user? without messing with the menu items
-Tuck
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Dec 26, 2012 2:39 pm

Well, I was asking about a "sound" module, not menus, but thanks for the suggestion.

Satoon
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Wed Dec 26, 2012 2:50 pm

satoon101 wrote:Well, I was asking about a "sound" module, not menus, but thanks for the suggestion.

Satoon


Taking care of all the related things you need to do, i.e. precaching and stopping sounds easily though the engine (not being much harder then to do then just creating a object). It should also be compatible thoughout orangebox/csgo engine

Syntax: Select all

s = MySound('path/to/file')
s.play()
#later..
s.stop()


But while still keeping some possibilities:

Syntax: Select all

s = MySound('path/to/file',users=(1,2,3), attenuation=0.7, volume=0.5)
s.play()
#later..
s.stop()
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Dec 26, 2012 3:01 pm

Ok, I will look into adding this type of functionality. I am also planning on adding a list object that handles downloadables, at some point.

Satoon
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Sat May 10, 2014 3:30 pm

was this sound functionality ever added ? :)

engines.sound is there but how would i add custom sounds etc and example of playing sounds would be great thanks in advance
-Tuck
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sat May 10, 2014 3:33 pm

You can handle sounds directly, but there has not been an API build around it as of yet. We still plan on doing this, but just have not gotten to it.
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Postby Doldol » Mon May 12, 2014 8:42 pm

Is there/will there be a way of streaming audio to a player, without having them download the file in advance? (I'm not talking about an motd with an embedded music player, I'm talking about doing this through the Engine's sound system.)

Also a general popup/menu library would be nice, since plugins that override each other's popups are quite annoying, and pointless to code atm.
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Tue May 13, 2014 4:27 am

Using the path to engine sounds should do it :)
-Tuck
Omega_K2
Senior Member
Posts: 227
Joined: Sat Jul 07, 2012 3:05 am
Location: Europe
Contact:

Postby Omega_K2 » Tue May 13, 2014 6:26 am

Doldol wrote:Is there/will there be a way of streaming audio to a player, without having them download the file in advance? (I'm not talking about an motd with an embedded music player, I'm talking about doing this through the Engine's sound system.)

Also a general popup/menu library would be nice, since plugins that override each other's popups are quite annoying, and pointless to code atm.


I wrote my own popup library, working very well.

https://svn.german-slaughterhouse.de/svn/k2tools/trunk/addons/source-python/packages/custom/k2tools/popup/
https://www.german-slaughterhouse.de/wiki/K2Tools:Popup.manager

I think they changed the API a lot again, so it may need some tweaking though to get it to work with the current dev version, it was working with the last release last time I checked though.
Libraries: k2tools

Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)

Plugins (game-specific): None atm



If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
User avatar
Doldol
Senior Member
Posts: 200
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Postby Doldol » Wed May 14, 2014 8:14 pm

Omega_K2 wrote:I wrote my own popup library, working very well.

https://svn.german-slaughterhouse.de/svn/k2tools/trunk/addons/source-python/packages/custom/k2tools/popup/
https://www.german-slaughterhouse.de/wiki/K2Tools:Popup.manager

I think they changed the API a lot again, so it may need some tweaking though to get it to work with the current dev version, it was working with the last release last time I checked though.


The problem is that it isn't official, and that when there is an official library yours will have to be switched out for that one.

Return to “API Design”

Who is online

Users browsing this forum: No registered users and 20 guests