Plugin Punkin' Patches?

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
User avatar
optic delusion
Special Forces
Special Forces
Posts: 999
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Plugin Punkin' Patches?

Post by optic delusion » Sun Jul 31, 2005 9:07 pm

I was gonna say I'm tossing this to the dogs, but since the "BassMasters Classic" fishing tournament is here in Pittsburgh today, I'm casting a line.


I've kinda ignored this forum on purpose, as I have truckloads of ideas to enhance game play, and didn't want to give you all a headache. Expect to need aspirin soon.
That's also why had I never heard of a plugin for BZFlag until last week.
Plugins are the most exciting thing to happen to BZFflag since I joined a year ago.

My first questions are......
Plugins and patches, what are they, what's the difference, why do I want one so bad, and how do I make a patch into a plugin? Do I need to?
Are plugins everything that they seem to be? It looks to me like they hold worlds of possibilities, especially for the c++challenged server owner.
What can they do? What can't they do?
What are the compiling issues on my MAC? Will I even need to compile when the full architecture is in place?
Does anybody want to post some more plugins for me to look at?

Now I want you to know I've seen this.
http://my.bzflag.org/bb/viewtopic.php?t ... ght=plugin
But I felt these were such general questions, and the topic so exciting, It deserved a new thread. I'm not looking for sourceforge type answers, just bzflag.org type explanations.

Can plugins fulfill my dreams?









Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5182
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Post by JeffM » Sun Jul 31, 2005 10:36 pm

A patch is modified code that somone has made that will modify the software. To apply one, you must be able to build your own version. You apply the code changes from the patch and build the new modified version.

A plugin is new. A plugin is a library that is loaded by bzfs at run time. They are there own compiled modules and do not need to be built on the end users system.

Patches can modify anything ( they are just mods to the source ). Patches are harder to apply, and do not allways mix well. Patches allmost allways get broken as bzflag changes, so a patch for 1.10 will not work on 2.0 source code.

Plugins are more limited in what they can do, but are simple to apply, and mix really well. Plugins use a specific API, that does not change as much as the internal code, so they will hold up better in the long run. Plugins are also a bit easyer to make since they have a cleaner API to work from and arn't cluttered up with the rest of the bzfs code.

Patches can modify the client, plugins cant.

2.0.4 will be the first plugin release, I hope they can be used for things people would make patches for, and make the mods more useable by more people. We are allways adding to the API, so if you don't see something that you want to do, please let us know and we'll see about ading it.

many existing patches can be made as plugins.

2.0.4 will ship with some "standard" plugins, like the new /scorereset plugin.

User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5182
Joined: Fri Dec 13, 2002 4:11 am
Location: https://github.com/OmniTanks
Contact:

Post by JeffM » Sun Jul 31, 2005 10:42 pm

oh and plugins will be working for mac before the 2.0.4, they just need some build help.

in the end, if the plugin builder can make for your platform, then NO you would not have to compile anything to apply a plugin ( this is there power ).

User avatar
Pimpinella
Private First Class
Private First Class
Posts: 96
Joined: Wed Nov 19, 2003 4:50 pm
Location: Jever, NDS, Germany

Post by Pimpinella » Sun Jul 31, 2005 10:51 pm

A 'patch' is a file containing differences between two versions of a program written in a file format suitable for use with the program patch. Patches are created using the program diff. Usually a patch contains the differences between the "official" version of a program and a local branch with modifications. If you want to use a patch you need to apply it to the official version's sources and compile everything.

A plugin is a separate, optional addon to a program, that can be loaded at runtime. You don't need to change or recompile the program to use it, you just need to instruct it to use the plugin.

Plugins rely on an API (Application Programmin Interface), that allows to plug in (sic!) code into specific parts of the program. If one of your wishes can be made true using a plugin depends upon if the API has a slot for the behavior you want to change. If there is one you're lucky, if not you might ask develpoers to make one for you.

A patch doesn't rely on an API and can change anything.

Bringing the functionality of a patch into a plugin (if possible) will usually mean that you have to reimplement most things, the code will be reusable only partially.

Not sure about the compiling issues on mac.

User avatar
Pimpinella
Private First Class
Private First Class
Posts: 96
Joined: Wed Nov 19, 2003 4:50 pm
Location: Jever, NDS, Germany

Post by Pimpinella » Mon Aug 01, 2005 8:57 am

seems i was too late...

User avatar
optic delusion
Special Forces
Special Forces
Posts: 999
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Thanks guys,

Post by optic delusion » Fri Aug 05, 2005 11:21 pm

Thanks guys that's great.
Someday soon server owners will be able to simply add a plugin to their bzfs folder, and choose to use it or not with a loadplugin command.
The plugins can be passed around, and easily used by all, with minimal programming needed by server owners.
Some day, we may need a seperate forum for plugins...

For windows it will be .dll format, for mac/linux it will be .so format? is that correct?
Right now I have a pretty advanced plugin built by RPG, for windows, I want to run it on a mac eventually, but would really,really like to test it now.
The only known servers running windows are Skinny's and Tropican8's
I'm working on CVS with Tropic, to get the latest API, but right now it's not really promising.
Is there anybody out there who wants to give my race-to-seven plugin a try under windows?
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

User avatar
optic delusion
Special Forces
Special Forces
Posts: 999
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Thankyou all

Post by optic delusion » Sat Aug 06, 2005 4:43 am

Thanks to RPG for creating the plugin.
Thanks to Tropican8, for serving on windows.
Thanks to JeffM for seventeen quadrillion things.
AND Thanks to every dev since 1980.

Tonight I beta tested the race-to-seven-flag-captures team scoring plugin.
After Tropican8 got the correct bzfs version, (freshly built by Jeff) he simply dropped the plugin into the folder. One command, and done.
It crashes the server at the end of every match, but that can be fixed. It works fine up to that point.
I Love It!

Plugins ARE the future of BZFlag serving!

....and if the plugin is made robust, and confoms to conventions, it may someday be included in the BZFlag distribution. AMAZING!
my stupid little idea might someday be reality.

If you'd like to see it in action, take your client to 1badplayer.no-ip.org:4201, and hope it's not crashed.
Take a look at my Defender game mode concept.

Thinking is not an automatic process. A man can choose to think or to let his mind stagnate, or he can choose actively to turn against his intelligence, to evade his knowledge, to subvert his reason. If he refuses to think, he courts disaster: he cannot with impunity reject his means of perceiving reality.

Post Reply