fairCTF

Expand and mod your server.
meeba
Master Sergeant
Master Sergeant
Posts: 507
Joined: Sun Mar 12, 2006 10:49 pm
Location: N. Sanity Beach
Contact:

Post by meeba » Fri Jul 07, 2006 10:06 pm

and another thing: this is only happening when a user is kicked or banned.

meeba
Master Sergeant
Master Sergeant
Posts: 507
Joined: Sun Mar 12, 2006 10:49 pm
Location: N. Sanity Beach
Contact:

Post by meeba » Sat Jul 08, 2006 12:19 am

hm, problem seems to have gone away. I think there's an issue with kicking bots (which is what I was doing to test the plugin).

nevermind the above posts, good coding. :)

User avatar
cosmos
Private First Class
Private First Class
Posts: 76
Joined: Thu Dec 23, 2004 7:18 pm
Location: Los Angeles
Contact:

Post by cosmos » Wed Jul 12, 2006 4:48 am

Constitution wrote:I've created a simple patchfile that changes the plugin's behaviour somewhat. This file should patch against the current 1.2 version of the fairCTF plugin source code. This patch implements the following features:
1. Teams are now free to carry their own team flags at any time.
2. The weaker team (the one with fewer players) can now carry the stronger team's flag at any time. In a map with more than two teams, this is true of any one team's number of players relative to any other team's number of players.

Thought you all might enjoy this, since it has been requested multiple times. Have fun!
all i get is:

patching file fairCTF.cpp
patch: **** malformed patch at line 13: @@ -10,6 +14,8 @@

anyone on the *nix side of the house successfully apply this patch?

User avatar
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Wed Jul 12, 2006 5:19 am

TangenT:

I'm not sure what the problem you were having could possibly have to do with the changes I made with the patch. I would more likely blame it on a library/linking/configuration error. If anyone who's a C++ expert can identify a problem with my code, I'd be very happy if they could point it out so I could fix it.

cosmos:

The only thing I can think of is that either you don't have the latest fairCTF source code, or you've already made personal changes to the the source code. The patch will probably only work with a fresh copy of the source code. Try downloading it here: http://my.bzflag.org/bb/download.php?id=3627

User avatar
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Wed Jul 12, 2006 6:16 am

Hmmm, I looked into cosmos' problem a little deeper, and discovered that there may have been a problem with the patchfile somehow. I'm almost certain that it patched okay on my machine at first (Mac OS X 10.4), but I had troubles similar to what cosmos had today. In any case, for those of you who've had troubles with the patch, please download the attached patchfile and try it instead (I've also updated the file attachment on the original post). If it's working okay for you, then never mind this.
Attachments
const_fairctf_new.diff.txt
(3.21 KiB) Downloaded 686 times

meeba
Master Sergeant
Master Sergeant
Posts: 507
Joined: Sun Mar 12, 2006 10:49 pm
Location: N. Sanity Beach
Contact:

Post by meeba » Wed Jul 12, 2006 6:31 pm

Constitution: Kicking normal users off doesn't affect it. It's when I kick a bot that it causes problems.

User avatar
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Post by macsforme » Wed Jul 12, 2006 11:58 pm

TangenT wrote:Constitution: Kicking normal users off doesn't affect it. It's when I kick a bot that it causes problems.
Wow, I have no idea what the problem could be. Does it do it when you use the fairCTF plugin without my modifications? Makbe try doing a "make clean", and then recompiling everything?

meeba
Master Sergeant
Master Sergeant
Posts: 507
Joined: Sun Mar 12, 2006 10:49 pm
Location: N. Sanity Beach
Contact:

Post by meeba » Thu Jul 13, 2006 1:00 am

it does it even without the plugin. and on the server, I can't access the make commands.

anyways, as long as there's no bots, I'm good. and I have bots disabled (I should, rather, it's right on at least one part of the rotation).

User avatar
Grans Remedy
Private First Class
Private First Class
Posts: 91
Joined: Sun Dec 05, 2004 10:47 pm
Location: New Zealand

a little help pse...

Post by Grans Remedy » Sat Sep 08, 2007 11:39 pm

I cant get this plugin to work on bzfs 2.0.8 under CentOS 4

I've downloaded it from source (binary didnt work) and ran make.

Two files were created: fairCTF.o and fairCTF.so

Note that /loadplugin <pathtoplugins> produces an error: no such command when run in the client. I've looked in the server log file for error messages, but cant see any related to the loading of this plugin, using -loadplugin ... in the bz.conf file.

Can someone give me a clue please?

Cheers
Grans
No coffee, no workee

User avatar
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Re: a little help pse...

Post by macsforme » Sun Sep 09, 2007 7:20 am

Grans Remedy wrote:Note that /loadplugin <pathtoplugins> produces an error: no such command when run in the client.
You need a bzfs with plugin support. If you installed bzfs from a binary, you will need to get a copy of the source and compile it yourself. Do

Code: Select all

./configure --enable-shared
... to enable plugin support, and then

Code: Select all

make ; sudo make install

Quol
Private First Class
Private First Class
Posts: 112
Joined: Mon Feb 10, 2003 9:10 pm
Location: Montreal, Quebec, Canada

Post by Quol » Sat Sep 15, 2007 8:03 pm

with bzfs from cvs, I get this when I load the plugin:

Plugin:/etc/bzflag/plugins/fairCTF.so found but expects an older API version (15), upgrade it

any ideas on how to fix it?

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r » Sat Sep 15, 2007 8:13 pm

You'll need to build it with a newer bzfsAPI.h. Take the one from your CVS build (in the include directory) and replace the one distributed with the plugin with that. Re-compile, and it should work.

I'm told that the plugin is broken with newer versions of bzfs, though. :\
Optimism is just a milder alternative to denial.

User avatar
blast
General
General
Posts: 4746
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Post by blast » Sat Sep 15, 2007 8:46 pm

You also want SVN, not CVS. We no longer use CVS for BZFlag.

http://my.bzflag.org/w/BZFlag_SVN
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Post by L4m3r » Sun Sep 16, 2007 1:13 am

blast wrote:You also want SVN, not CVS. We no longer use CVS for BZFlag.

http://my.bzflag.org/w/BZFlag_SVN
Oh, right. How did I not catch that? >_<
Optimism is just a milder alternative to denial.

Quol
Private First Class
Private First Class
Posts: 112
Joined: Mon Feb 10, 2003 9:10 pm
Location: Montreal, Quebec, Canada

Post by Quol » Sun Sep 16, 2007 3:51 am

ya - subversion, that's what I actually meant - sorry about that, just used to saying CVS.

thanks guys, it worked.

I did replace bzfsAPI.h before, but I guess something went wrong somewhere, or I really screwed up - who knows.

I made sure to replace it again, and recompile, and it loaded up just fine and seems to work.

Thanks
--Q

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

fix dereference of null pointer

Post by optic delusion » Wed Nov 21, 2007 7:06 am

I'm releasing some of Thumper's plugin fixes that he did recently.
I don't know why these two are not added to official source.
Attachments
fairCTF.zip
fix dereference of null pointer
(6.68 KiB) Downloaded 476 times
fairCTFstrong.zip
fix dereference of null pointer
(5.88 KiB) Downloaded 465 times
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
macsforme
General
General
Posts: 2024
Joined: Wed Mar 01, 2006 5:43 am

Re: fix dereference of null pointer

Post by macsforme » Wed Nov 21, 2007 8:37 pm

Optic Delusion wrote:I'm releasing some of Thumper's plugin fixes that he did recently.
I don't know why these two are not added to official source.
IIRC, L4m3r thought that the plugin should be re-written to take advantage of better API methods that are now available.

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Re: fix dereference of null pointer

Post by L4m3r » Wed Nov 21, 2007 10:03 pm

Constitution wrote:IIRC, L4m3r thought that the plugin should be re-written to take advantage of better API methods that are now available.
Indeed, the plug-in is extremely primitive and somewhat wonky. I'll add it to the source tree when it's not a steaming pile of crap. :p
Optimism is just a milder alternative to denial.

pacman87
Private First Class
Private First Class
Posts: 23
Joined: Sat Jul 01, 2006 3:35 pm

My version

Post by pacman87 » Tue Dec 18, 2007 11:31 am

I've just released my Fair4CTF plugin. Details are in the main post:
http://my.bzflag.org/bb/viewtopic.php?p=118925#118925

Summary:
- works for 4 teams - compares in pairs (your team vs the team of the flag you're trying to take).
- smaller teams can always cap.
- teams can always carry their own flags.
- can autokick/autokill players who keep grapping an off-limits flag (because hearing that siren go off 5 times in a row starts to get annoying).
- choose between kick/kill and number of illegal flag grabs to take action.

If you've got comments or suggestions, let me know in my release thread.

User avatar
allejo
Breaker of Builds
Breaker of Builds
Posts: 765
Joined: Sun Feb 17, 2008 10:01 pm
Location: /dev/null
Contact:

Re: fairCTF

Post by allejo » Sun Jul 10, 2011 5:55 am

updated fairCTFstrong and fairCTF to 2.4
Attachments
fairCTF.cpp
BZFlag 2.4
(6.78 KiB) Downloaded 208 times
fairCTFstrong.cpp
BZFlag 2.4
(8.29 KiB) Downloaded 203 times
Here's my personal website and my open source projects are available on GitHub; I work on a lot of cool things.

Image

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Re: fairCTF

Post by L4m3r » Fri Feb 10, 2012 4:09 pm

fairCTF has been added to the BZFlag source tree at the request of Bullet Catcher. Get the plugin there from now on. :)

I've also taken the opportunity to rewrite most of it to use more logical events. Flag drop delay is now configureable; see readme.
Optimism is just a milder alternative to denial.

User avatar
Bullet Catcher
Captain
Captain
Posts: 553
Joined: Sat Dec 23, 2006 7:56 am
Location: Escondido, California

Re: fairCTF

Post by Bullet Catcher » Fri Feb 10, 2012 5:23 pm

Thanks, L4m3r, for your generous contribution to the project.

If there is interest and it makes sense to do so we can integrate the features of fairCTFstrong and/or Fair4CTF into this version so server operators won't have to compile them separately. We just need to ensure that server operators can continue to choose between the different flavors of functionality. As usual, non-developers must submit patches through SourceForge to document that they agree to compatible license terms for their submissions.

User avatar
L4m3r
Hater of Everything
Hater of Everything
Posts: 724
Joined: Tue Feb 08, 2005 5:15 am
Location: Los Angeles

Re: fairCTF

Post by L4m3r » Sun Feb 12, 2012 12:01 am

I had thought that fairCTFstrong was made kind of redundant by fair4CTF, which was why I didn't include that functionality in the rewrite.

Perhaps there is room for two CTF plugins in BZFlag. I can see two very different approaches to the problem- fairCTF is one, a static mode change to shut down the CTF game. The other method would be more dynamic, making a fairness judgement on the fly whenever someone grabs a team flag. Either style is fairly simple to implement by itself, so having two different plugins might be simpler than trying to mash the two together.
Optimism is just a milder alternative to denial.

Post Reply