Plug-ins
Plug-ins
BZFS now supports plug-ins ( in CVS at least ).
Plug-ins can be used to make the server change how it normaly does things. Plug-ins are loaded at runtime from external modules, and have access to a number of bzfs's internal features. They most often respond to events, but can can be used to implment things such as cusom "/" commands or chat filters.
So far the first 2 sample plugins are;
shockwaveDeath
Causes a shockwave to fire when ever anyone dies. Ether from the server like a world weapon, or from the player who died.
playHistoryTracker
Provides a "UT" style anouncement for players who have multiple kills with no intervening deaths. Aka. the KILLING SPREE.
hiddenAdmin New
removes the admin bit sent to clients so admins don't show up with the tell tale @ before there names.
These are just examples. The API that the plug-ins have access to is rather small at the moment but we are adding to it all the time.
If anyone has any ideas for plug-ins please post them. Knowing what people would like to do helps us know what things we should expose to the plugins.
Plug-ins can't do anything. They can only do things that are purely server side. They are not used by the client in any way.
Plug-ins can be used to make the server change how it normaly does things. Plug-ins are loaded at runtime from external modules, and have access to a number of bzfs's internal features. They most often respond to events, but can can be used to implment things such as cusom "/" commands or chat filters.
So far the first 2 sample plugins are;
shockwaveDeath
Causes a shockwave to fire when ever anyone dies. Ether from the server like a world weapon, or from the player who died.
playHistoryTracker
Provides a "UT" style anouncement for players who have multiple kills with no intervening deaths. Aka. the KILLING SPREE.
hiddenAdmin New
removes the admin bit sent to clients so admins don't show up with the tell tale @ before there names.
These are just examples. The API that the plug-ins have access to is rather small at the moment but we are adding to it all the time.
If anyone has any ideas for plug-ins please post them. Knowing what people would like to do helps us know what things we should expose to the plugins.
Plug-ins can't do anything. They can only do things that are purely server side. They are not used by the client in any way.
Last edited by JeffM on Mon May 23, 2005 1:10 am, edited 1 time in total.
JeffM
- RPG
- Lieutenant, Junior Grade
- Posts: 2015
- Joined: Fri Sep 17, 2004 2:37 am
- Location: Chicago, Illinois
- Contact:
If someone makes a plugin, can that person get it bundled with the next BZFlag release, or does the individual have to promote the plugin on his/her own?
And could you please make a "plugin" forum?
EDIT: Aha, now I see
And could you please make a "plugin" forum?
EDIT: Aha, now I see
Plug In File wrote:A plug-in is a compiled code module that is loadable at runtime by the BZFlag
game server (bzfs) that can change the way that the server runs. Since plug-ins
are compiled Plug-ins need to be built on the platform they are to be run with.
This means that a plug-in built for windows will not work on linux, and vice/
versa. Plug-ins are writen in C++ as Dynamic Librarys, ether as a DLL on windows
or a .so file on linux/OS X.
compiled plug-ins can only be used on the same type of system the were built on. Linux plug-insdon't work on windows for instance.
Disributing them with the builds could be problematic. More then likely there will be a plugins library that server owners can pull from with ether binary builds of plugins for systems that support them well ( like windows ), and source releases of them for those that don't ( linux ).
Plug-ins are very easy to build, and very small.
CVS will have some plug-ins in it. Not all plug-ins will be in CVS, so there will be some promotion by the authors. The nice thing is plug-ins have about the same risk as patches, since they are optional, so geting them into CVS could be easyer.
I'm sure eventualy we'll make a plugins forum, but for now it's very very brand new.
Disributing them with the builds could be problematic. More then likely there will be a plugins library that server owners can pull from with ether binary builds of plugins for systems that support them well ( like windows ), and source releases of them for those that don't ( linux ).
Plug-ins are very easy to build, and very small.
CVS will have some plug-ins in it. Not all plug-ins will be in CVS, so there will be some promotion by the authors. The nice thing is plug-ins have about the same risk as patches, since they are optional, so geting them into CVS could be easyer.
I'm sure eventualy we'll make a plugins forum, but for now it's very very brand new.
JeffM
- Supertanker
- Private First Class
- Posts: 363
- Joined: Sat Mar 19, 2005 9:56 pm
- BinarySpike
- Corporal
- Posts: 735
- Joined: Mon Mar 28, 2005 11:58 pm
- Contact:
- BinarySpike
- Corporal
- Posts: 735
- Joined: Mon Mar 28, 2005 11:58 pm
- Contact:
apple says
just because it's apple dosn't mean it has to be diferent
so it will be just like linux it looks like. Heck the code as is may even work.Preferred Functions
These are the recommended functions to use to interact with the dynamic loader. These functions work in Mac OS X v10.3 and v10.4. However, in Mac OS X v10.4 they are more efficient that other image-loading functions. These functions are declared in /usr/include/dlfcn.h.
dladdr Finds the image and nearest symbol corresponding to an address. Available only in dynamically linked programs.
dlclose Closes a dynamic library or bundle.
dlerror Provides diagnostic information corresponding to problems with calls to dlopen, dlsym, and dlclose in the same thread.
dlopen Loads and links a dynamic library or bundle.
dlsym Returns the address of a symbol.
just because it's apple dosn't mean it has to be diferent
JeffM
Of course it does.JeffM2501 wrote:just because it's apple dosn't mean it has to be diferent
If it's the same, it can't be better... Rofl!
Anyway, my idea:
Could you use this to run bots on a server?
So that you don't need to run bzflag.2.0.x.app -solo # in the command line as well as running bzfs...
My guess is it's not feasable, but it would be great if it was!
- RPG
- Lieutenant, Junior Grade
- Posts: 2015
- Joined: Fri Sep 17, 2004 2:37 am
- Location: Chicago, Illinois
- Contact:
Bots are client-side, and pulgins only work server-side, so the answer would be no.CBG wrote:Anyway, my idea:
Could you use this to run bots on a server?
So that you don't need to run bzflag.2.0.x.app -solo # in the command line as well as running bzfs...
My guess is it's not feasable, but it would be great if it was!
But that was my point...RPG wrote:Bots are client-side, and pulgins only work server-side, so the answer would be no.CBG wrote:Anyway, my idea:
Could you use this to run bots on a server?
So that you don't need to run bzflag.2.0.x.app -solo # in the command line as well as running bzfs...
My guess is it's not feasable, but it would be great if it was!
Why can't there ba a plug-in to enable bzfs to run bots?
I know its probably not possible, but would make it a lot easier if it was.
- BinarySpike
- Corporal
- Posts: 735
- Joined: Mon Mar 28, 2005 11:58 pm
- Contact:
- BinarySpike
- Corporal
- Posts: 735
- Joined: Mon Mar 28, 2005 11:58 pm
- Contact:
- purple_cow
- Private First Class
- Posts: 63
- Joined: Sun Dec 15, 2002 9:24 pm
Python lovin'
For those of you who aren't down with writing C++ code to do your plugins, I've finished about half of a plugin which binds the API into python. Combined with external python packages, this allows some very cool things to be created pretty easily -- for example, integrating with twisted to provide a web administration frontend that runs in-process, no extra web server needed.
I expect you all to create nifty stuff once this is done
I expect you all to create nifty stuff once this is done