RacetoSeven 1.12.1

Expand and mod your server.
Post Reply
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

RacetoSeven 1.12.1

Post by RPG »

Author: RPG

Description: This is just a release to conform to API version 12. No other enhancements, just API support. Also, there should be NO crashes with this version.

Files:
(If someone could compile for Linux, I'm sure the Linux folk would appreciate)
(If someone could compile for Mac, I'm sure the Mac folk would appreciate)
Attachments
racetoseven.zip
RacetoSeven - Source (.cxx)
(14.14 KiB) Downloaded 610 times
racetoseven-win.zip
RacetoSeven - Windows (.dll)
(66.39 KiB) Downloaded 595 times
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

You hat

Code: Select all

linux:/home/death/bzflag/plugins/racetoseven # make
g++ -fPIC -frtti -I../../include -O   -c -o racetoseven.o racetoseven.cpp
In file included from racetoseven.cpp:8:
Tokenize.h:3:140: warning: no newline at end of file
In file included from racetoseven.cpp:9:
ConfigParser.h:1:40: warning: no newline at end of file
racetoseven.cpp:547:2: warning: no newline at end of file
g++ -fPIC -frtti -I../../include -O -shared -rdynamic  racetoseven.o -o racetoseven.so
linux:/home/death/bzflag/plugins/racetoseven #     
I'm sure it's "nothing big" but dammit man - sloppy form.
...This has been a recording.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

windows dosn't have that lame restriction, so don't blame him. He's probably never seen it before.
ImageJeffM
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

Code: Select all

./bzfs: symbol lookup error: /home/death/bzflag/plugins/racetoseven/racetoseven.so: undefined symbol: _Z8tokenizeRKSsS0_ib
linux:/home/death #  
Today's CVS
...This has been a recording.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

welcome to the world of development. Best would be to send stuff like that to the plugin developer in oh say a PM. not in his release forum.

the API is still changing. I'd not upgrade to CVS untill the custom plugin developer tells you HE'S updated the plugin for CVS.
ImageJeffM
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

RPG, give out a complete list of goals this plugin achieves.
...This has been a recording.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Everything I wanted to do in the plugin is pretty much finished, I just need to keep it up with the API.

You can read the changelog to see exactly what it does. I'll save you the effort:

Code: Select all

-------------------------CHANGELOG-------------------------
1.12.1 (Release):
BUGFIX: Replaced all TextUtils functions with API functions, to comply with API 12.
BUGFIX: All crashes shall cease... check data pointers for NULL value before using them.

1.11.1 (Release):
FEATURE: Added -allowMatches config option, so in essence, admins can "dissalow" matches.

0.11.1:
FEATURE: When you /match config set _variable, it will show you what you set it to.
FEATURE: Added configuration file support
FEATURE: New versioning system (Major.APIversion.minor)

Beta 4:
REMOVAL: Took out /match ? and /match help, and combined that documentation with the documentation when you type /match.
BUGFIX: Upgraded to API 11.
BUGFIX: Commented out bz_resetPlayerScore as an attempt to stop the crashes we get.
BUGFIX: Changed the spelling of some of the classes to reflect changes in bzfsAPI.h.
BUGFIX: Admins could end matches when they weren't running, causing a blank report to be sent. This has been fixed.
FEATURE: If there is nobody on the server, the plugin will automatically end the match.
BUGFIX: Fixed the code that logged what team the person who typed "/match start" was on.
FEATURE: When a match is started, the plugin says "First team to # captures wins!".

Beta 3:
FEATURE: Punishes and kicks people who cap their own flag during a match.
FEATURE: Congratulates the capper if he caps the other team's flag.
FEATURE: Added the MATCHCONFIG perm, for users to be able to modify the configuration.
FEATURE: Added the /match config <list|add|reset> <name> <value> command, to manage the configuration.
FEATURE: In the command list that is displayed when the user mistypes a command, it lists the commands the user can and can't run.
REMOVAL: Took out the /set variable, _allowPlayersDuringMatch, due to it's buggy nature
FEATURE: Added MATCHEND perm, for people allowed to forcefully end matches.

Beta 2:
FEATURE: Added new permission, MATCHSTART, that must be put in your groups file if you want a player to be able to start a match.
BUGFIX: If a match is not in progress, nobody can end it (since there is none), not even an admin.
FEATURE: Added new /set variable, _allowPlayersDuringMatch to control the flow of players during a match. (although has some bugs)
FEATURE: Added 4 team support.
FEATURE: Admins can join matches as players, even if players are being locked out.
FEATURE: "/match" now shows the documentation.
BUGFIX: You can't start a match if one is already in progress.
I'll do the newline thing, if it makes everyone happy. Also, there was a file in there, configParser.cxx, that you didn't need. When I removed it from the VC++ project, I expected it to actually delete the file from the disk, but obviously that wasn't the case.[/list]
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Please help!

Post by optic delusion »

Could somebody, anybody, please give me some help compiling this plugin for MAC OSX.
I'm begging here, any help at all will be greatly appreciated! I just can't compile it...
Here is what I get when i attempt to make the plugin.

Bearded-Computer:~/cvs/bzflag/plugins/racetoseven Bearded$ make
g++ -fPIC -frtti -I../../include -O -c -o racetoseven.o racetoseven.cpp
g++ -fPIC -frtti -I../../include -O -shared -rdynamic racetoseven.o -o racetoseven.so
g++: unrecognized option `-shared'
g++: unrecognized option `-rdynamic'
ld: Undefined symbols:
_main
bz_hasPerm(int, char const*)
bz_kickUser(int, char const*, bool)
bz_addURLJob(char const*, bz_URLHandler*, char const*)
bz_killPlayer(int, bool, int, char const*)
bz_newIntList()
bz_resetFlags(bool)
bz_getTeamWins(bz_eTeamType)
bz_removeEvent(bz_eEventType, bz_EventHandler*)
bz_debugMessage(int, char const*)
bz_getTeamScore(bz_eTeamType)
bz_getTeamLosses(bz_eTeamType)
bz_registerEvent(bz_eEventType, bz_EventHandler*)
bz_resetTeamScore(bz_eTeamType)
bz_sendTextMessage(int, int, char const*)
bz_getPlayerByIndex(int)
bz_getPlayerIndexList(bzAPIIntList*)
bz_removeCustomSlashCommand(char const*)
bz_registerCustomSlashCommand(char const*, bz_CustomSlashCommandHandler*)
tokenize(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool)
bz_format(char const*, ...)
bzApiString::replaceAll(char const*, char const*)
bzAPIIntList::size()
bzApiString::c_str() const
make: *** [racetoseven.so] Error 1
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
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

A-Delusion
I can't get any plugin to work, for that matter. :| Good luck...
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
ts
Dev Monkey
Dev Monkey
Posts: 970
Joined: Fri Jan 14, 2005 6:26 pm

Post by ts »

:arrow: A-Delusion:
Use the makefile I posted at http://my.bzflag.org/bb/viewtopic.php?t=5128 and move the racetoseven pluging into bzflag/plugins. Then do the stuff shown below. The ".so" file will be the compiled plug-in. Note that the server will lock up when the plugin will be used because of the error I_Died_Once has posted.

Code: Select all

p54b004e0:~ spiele$ cd /Users/spiele/bzflag/plugins/racetoseven/ 
p54b004e0:~/bzflag/plugins/racetoseven spiele$ make
g++ -fPIC -fno-common -frtti -I../../include -O   -c -o racetoseven.o racetoseven.cpp
g++ -fPIC -fno-common -frtti -I../../include -O -bundle -flat_namespace -undefined suppress -shared -rdynamic  racetoseven.o -o racetoseven.so
powerpc-apple-darwin8-g++-4.0.0: unrecognized option `-shared'
powerpc-apple-darwin8-g++-4.0.0: unrecognized option `-rdynamic'
p54b004e0:~/bzflag/plugins/racetoseven spiele$ 

:arrow: A Meteorite:
Plug-ins are working on the Mac. If you're using the official 2.0.4 binary I suppose you can't use them (according to learner this is a Mac OS X 10.2 restriction in order to make the binary work there),[/quote]
GU league: http://www.guleague.org/
An introduction to TCP: http://www.lafkon.net/tc/
User avatar
A Meteorite
Private First Class
Private First Class
Posts: 1786
Joined: Thu Apr 28, 2005 12:56 am
Location: California, U.S.
Contact:

Post by A Meteorite »

ToughShooter wrote: :arrow: A Meteorite:
Plug-ins are working on the Mac. If you're using the official 2.0.4 binary I suppose you can't use them (according to learner this is a Mac OS X 10.2 restriction in order to make the binary work there),
Actually I was using 2.0.3 CVS. Now I've upgraded to 2.0.5 CVS and I still can't use plugins... (even compiled 2.0.4 source)

But let me try that makefile...

(on Mac OS X 10.4)
Image
Owner @ BZFX
Core Admin @ CAN

Email me: bzmet…@gmail.com
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Nope.

Post by optic delusion »

No Dice. Under 10.3
I had figured that using that makefile was the key weeks ago, and had tried it several times. I tried it a couple more times, no dice.
ToughShooter, could you just post them as a bundle, like you did before?
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.
ts
Dev Monkey
Dev Monkey
Posts: 970
Joined: Fri Jan 14, 2005 6:26 pm

Post by ts »

Unluckily I don't know whether it's possible to build those plug-ins under 10.3.

I could post all plugins as bundles but as stated some (like this one) would not be compatible with 2.0.4. I don't think it's would be a good idea to post binaries that are incompatible to major versions in public.

The first one was rather to show that it works and is possible.
GU league: http://www.guleague.org/
An introduction to TCP: http://www.lafkon.net/tc/
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Success!

Post by optic delusion »

3:14 AM local time...from the terminal

RacetoSeven ERROR: Could not open config file. Using default values.
Race to 7 plugin loaded
Plugin:/usr/local/lib/racetoseven.so loaded

ToughShooter: I could not have done it without your modified makefile. Thank You Sir. I was able to compile V. 1.12 under 10.3. Had to move it to /usr. Now that I know what I was doing wrong, I feel pretty stupid that I didn't figure it out earlier.
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: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

No crash.

Post by optic delusion »

No crash on my mac.
As a matter of fact it ran nearly flawlessly all night. I ran at least twenty matches, 2-team, 4-team, even 3-team. Set allowPlayersDuringMatch true and false. Set capNum to 1,3,5,and 7, it's all good.
Only problem was twice a team flag disappeared, but that happens sometimes without the plugin.
The built-in /match help files are tremendous!
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
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

well...

Code: Select all

./bzfs: symbol lookup error: /home/death/bzflag/plugins/racetoseven/racetoseven.so: undefined symbol: _Z8tokenizeRKSsS0_ib
...This has been a recording.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

I_Died_Once wrote:well...

Code: Select all

./bzfs: symbol lookup error: /home/death/bzflag/plugins/racetoseven/racetoseven.so: undefined symbol: _Z8tokenizeRKSsS0_ib
Ermh. That may be because this was my first attempt at a multi-file system, i.e. the plugin consists of more than one .cxx file. It works fine on Windows, and goes by all the tutorials I read. Maybe the next release (which should happen tonight) will fix your errant error.
User avatar
I_Died_Once
Special Forces
Special Forces
Posts: 635
Joined: Sun Nov 28, 2004 5:27 pm
Location: The Dark Side
Contact:

Post by I_Died_Once »

Hey RPG, every since we got the plugin to work, things have been great. However, there are a couple of minor issues...

As you know, I have automatic matches starting and ending every fifteen minutes on Planet MoFo (whenever the server is hosting a CTF game that is) and I have noticed a little bit of misbehavior in your plugin.

If a player is on the server by himself, and a match starts when it is still that player by himself - then another tank joins another team, no flag cap the late joining team makes registers for the match. This is hard to explain...

Say I join MoFo as a red tank. Woot. A match is started automatically. Delusion comes on as a blue tank, and starts whipping my tail, capping my flag several times. When ever Delusion caps a flag, the racetoseven scoreboard comes up, and it'll show the red teams score (score - as in what the plugin counts and considers the score) but that'll be it. If someone from any other team joins, no caps they make count.

Only teams that were present when the match started - only those teams' scores count. If its a 4 team CTF game, and there are purple, green, and blue tanks present - red may join, but caps made by red don't count towards the score.

And that ain't cool.

Now, the flip is true - if all tanks from a given team leave a game, then another tank of the same color joins - their score don't count no more either.

Of course, I think it should be set to where if I come in halfway through a 4 team CTF match, and I am the only red tank - if I can do it, the plugin should count my scores as well, giving me a technical chance of winning.

Now, I may be off base on this but check it out.
...This has been a recording.
User avatar
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

I_Died_Once
What you're talking a bout was the desired effect. When I switched to a 4 team mode, the plugin would report the score for all 4 teams when someone capped. Often, it was a nusiance that we had to see the score of a team that wasn't playing in the match. So I added a system where, at the beginning of a match, it would remember which teams were populated and which teams were empty. Those variables would remain the same until a match end, when they are reset.

I really forgot the reason I did it that way, probably because it was the easiest. But, in the next version of RT7, it'll report scores based on which teams are present. Thanks for telling me, that was one of those things I was lazy over and now I gotta face the light.

Oh yeah, I mailed A-Delusion a recent package of RT7. Seems like I'm not tracking releases anymore, I'm just working on it and giving it to people when I see fit.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

2 vs 1 also causes that

Post by optic delusion »

It would be interesting to see the report generated at match completion from a match like that.
I have noticed and reported a similar effect, remember, the plugin was originally designed for a closed, league server. It also loses the score for one team if match is started when the players are 2 vs 1. Like 2 blues and one red, it will lose red's score.The match must be ended, but it doesn't cause any permanent damage.
I have not noticed this in 4 team, like 3 vs 3 vs 1 vs 1, and that is why I started a three team map, with my bot in the sole third team member, to check for this bug, a third team seems to cancel this bug out. I ended up with an unrelated bug, using team-flag safe zones.

It can also close (and then reopen) the server mid-match with the command /match config set _allowPlayersDuringMatch false. As long as we are on the subject, RPG, that command is too long to be added into my quick-keys, could you please shorten it?

I have not yet mac-compiled the latest version you sent, or a recent CVS, mostly because I don't want to screw up my current configuration. I'll give it a go tonight. I have API 12, and will stay with that until you tell me to change, RPG.
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
RPG
Lieutenant, Junior Grade
Lieutenant, Junior Grade
Posts: 2015
Joined: Fri Sep 17, 2004 2:37 am
Location: Chicago, Illinois
Contact:

Post by RPG »

Even with _allowPlayersDuringMatch set to false, admins can still join. That's the desired effect, no bugs there. I could shorten _allowPlayersDuringMatch, but what would I shorten it to? I don't think I can get it any smaller... _aPDM? _allowPlayersDurMatch? None of them sound appeasing.

Go ahead and try compiling with the new API. If it doesn't work, immediately get my attention, and I'll upgrade whatever has to be done. I'm at the point where I don't work on it daily anymore, so I'm not as prone to change for an API as I used to be.
User avatar
optic delusion
Special Forces
Special Forces
Posts: 1052
Joined: Sat Sep 25, 2004 2:29 pm
Location: Planet MoFo
Contact:

Version 1.14

Post by optic delusion »

Thumper has made some improvements to the R27 plugin.

The way scores are kept is changed, it counts flag captures while ignoring teams that are present at the start of a match. This means if a 2 team match is started, and then a 3'rd or 4'th team joins mid-match, the new team is accepted, and scores are correct for all teams. If a team is vacated, then later a new player joins that team, he keeps the old score.

Score announcements to players are clearer.
The winning team is announced at match end.
Also, some possible memory leaks have been fixed, and it should be a little bit easier to read the source. "it's still a mess"
Tested against bzfs 2.0.10RC3.

All the other functions of the plugin remain the same, including match reporting to a website, which is a great thing for a league to latch onto.
Attachments
racetoseven.cpp
By RPG (Garrett Padera) and A-Delusion. Improved to v.1.14 by Thumper
(21.35 KiB) Downloaded 406 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.
Post Reply