Page 1 of 1

Plug-in Development F.A.Q.

Posted: Sat Aug 13, 2005 7:34 pm
by JeffM
So you want to make a plug-in. Well great. Here is a list of common questions and answers that plug-in developers have.

Q) What do I need to make a plug-in?
A) There are a couple things you need. First is a compiler. How you get a compiler depends on your Operating System.

If you are on Linux, then your system comes with a compiler ( or damn well better have ).

If you are on Windows, then your system did NOT come with a compiler, and you need to get one. There are a couple free compilers out there for windows, We did not make support for all of them. Sadly MinGW and DevC++ do not make it easy to make plugins, so we did not support these compilers. Somone may support them in the future. Right now we support Visual C++ 7.1 or better. If you have Visual Stuidio .net 2003 or later you are good to go. If you do NOT have it, do not fear, you don't have to go out and buy anything. Microsoft has been kind enough to provide a free version of Visual C++ for people to learn on, and it will build plugins just fine. What you need is the Microsoft Visual C++ .net 2005 Express edition. you can get it right from here.
http://lab.msdn.microsoft.com/express/v ... fault.aspx
it is also a good idea to get the windows SDK so you have all the standard header files and librarys.
you can get it from here
http://www.microsoft.com/downloads/deta ... laylang=en

If you are on Mac OSX, your OS did come with a compiler. It is on your dev disk that came with your computer. But at this time we don't have a plug-in loader for OSX, so you are kind of screwed. We will have Mac OSX plugin support before 2.0.4 ships.

The next thing you need is the bzflag API and it's files. The best way to get this is to grab the source code package for the game. You can find this in the same place you got the game from. The source contains many samples and files usefull for plug-in development.

Again if you are on windows, you need one more thing. You need the bzfs API library. This is include in the API folder on each binary bzflag installer.

Q) How do I start a new plug-in?
A) We have provided a set of sample plug-ins in the bzflag source distroubtion. Many of these are shiped with the binary versions of the softare. One directory in the /plug-ins dir is called SAMPLE_PLUGIN this is a very special template plug-in. To make a new plug-in, simply;
  • copy the directory
    rename it to your new plug-in name
    open every file in the new folder
    change the text SAMPLE_PLUGIN to your new plug-in name, in every file
    Change the text SAMPLE_PLUGIN to your new plug-in name in the filename of any file that has it
    Save all the files
This will set you up a new plugin project on ether windows or linux. Then you are free to edit the code, add files, or do what ever you need.

Q) Are there any plug-in docs?
A) Yes there are, they are in HTML format and prety good. You can find them in the /plugins/docs/ folder in the source.

Posted: Fri Sep 30, 2005 1:24 pm
by I_Died_Once
Q) Are there any plug-in docs?
A) Yes there are, they are in HTML format and prety good. You can find them in the /plugins/docs/ folder in the source.
Is this available online?

For a bit

Posted: Wed Dec 21, 2005 8:40 pm
by SilverFox
I dropped them into my htdocs dir for easy access:

http://silvercat.tybox.net/plugins/