| Author | Message | 
	
		| -Smong- Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Mon Aug 02, 2004 4:19 pm     Post subject: Race |  |   |  |  
				| 
 |  
				| Here is a customisable race module.  	  | sample race.conf wrote: |  	  | #define PRIZE_WARP 7 #define PRIZE_THRUST 11
 #define PRIZE_SPEED 12
 #define PRIZE_FULLCHARGE 13
 
 [Race]
 MinPlaying=1
 MinTeams=1
 Laps=2
 
 ; rectangular checkpoint area (top left and bottom right map tile coord)
 ChkPt0=507,507,516,516
 ChkPt1=549,500,558,509
 ChkPt2=527,566,536,575
 
 ;whether checkpoint 0 is the start and the finish
 ContinuousMap=1
 
 ; anyone not in a safe zone on 'gogogo' gets specced
 InSafeToPlay=1
 
 ; stages: Ready, Start, CheckPoint, Lap, Death and Finish
 ; actions: Spec, ShipReset, Prize, WarpXY, ArenaMessage, Message
 
 ; message macros:
 ; name  - player's name
 ; lap   - laps completed so far
 ; chkpt - last checkpoint crossed
 ; rank  - position in the race, 0 if still racing
 ; time  - time in seconds since the race started (#.##)
 ; #     - play bong#.wa2
 
 ; example configuration:
 Ready-ShipReset = 1
 Ready-Prize = $PRIZE_SPEED,$PRIZE_SPEED, $PRIZE_THRUST, $PRIZE_THRUST
 Ready-WarpXY = 512,512
 Ready-ArenaMessage=Get ready!
 
 Start-ArenaMessage=GooOOoo Go GO gO!!%104
 
 CheckPoint-Message=checkpoint %chkpt ok%26
 
 Lap-Message=lap %lap time so far %time
 
 Death-ShipReset = 1
 Death-Prize = $PRIZE_WARP
 Death-ArenaMessage=%name had a fatal accident (%lap laps)
 
 ;Finish-Spec = 1
 Finish-Prize = $PRIZE_WARP, $PRIZE_FULLCHARGE
 Finish-ArenaMessage=#%rank %time %name
 | 
 I've been having problems with version 1 and version 2 .zip format, please say if you can't open the file (I might switch to tar.gz as this is mainly for linux anyway).
 
 
 
 version 1.2
 md5sum incase the forum gets confused over multiple files with the same name
 48a3aa5fbfc5d611d648c26912aac116
 
  asss-race.zip - 55.61 KB File downloaded or viewed 129 time(s)
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Mon Aug 02, 2004 9:31 pm     Post subject: |  |   |  |  
				| 
 |  
				| Is there a Changelog from last version?  Nevermind.  I'll look at it myself :d. 
 Stay tuned for an editted suggestion list...
 _________________
 Oldbie Server Help
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Bak ?ls -s
 0 in
 
  
 Age:26
 Gender:
  Joined: Jun 11 2004
 Posts: 1826
 Location: USA
 Offline
 
 | 
			
			  | 
				
					|  Posted: Mon Aug 02, 2004 10:27 pm     Post subject: |  |   |  |  
				| 
 |  
				| good work, although I'd prefer regions to specifing rectangles... not a big deal |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Mon Aug 09, 2004 6:11 pm     Post subject: |  |   |  |  
				| 
 |  
				| Hmm, documentation for 1.2 isn't correct.  I'm guessing all those new "Ready-" and "Finish-" config options aren't enabled yet.  Figured as much since WarpOnStart is still there. 
 Or maybe you didn't put the right source in for this version?  Haven't tried the binary yet.  Yes, that is the problem.
 
 binary - v1.2
 source - v1.1
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Smong Server Help Squatter
 
  
 Joined: 1043048991
 Posts: 0x91E
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Aug 12, 2004 4:04 pm     Post subject: |  |   |  |  
				| 
 |  
				| AAArgh!! |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| -Smong- Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Aug 13, 2004 12:43 pm     Post subject: |  |   |  |  
				| 
 |  
				| Hopefully this one will contain the correct source code. 
 
 
 1734afda1e766e962b606f83137ecd5e
 
  asss-race.zip - 56.56 KB File downloaded or viewed 122 time(s)
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Aug 13, 2004 8:36 pm     Post subject: |  |   |  |  
				| 
 |  
				| First public suggestion: 
 A checkpoint wav message (just the wav, not the message) seems to be playing after crossing the finish line.  This plays a little before the finish message, which may also contain a sound.  It doesn't seem like it should do this though...
 
 Last edited by i88gerbils on Fri Aug 20, 2004 2:52 pm, edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| -Smong- Guest
 
 
 Offline
 
 | 
			
			  | 
				
					|  Posted: Wed Aug 18, 2004 5:04 pm     Post subject: |  |   |  |  
				| 
 |  
				| It's actually line 930: do_actions(NULL, p, "CheckPoint"); that is causing the problem. At the moment I don't have the time to come up with a practical solution as things like %chkpt need to work as expected (quick/dirty fix is to comment out line 930, and add else do_actions(NULL, p, "CheckPoint"); at line 971). |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Aug 20, 2004 6:27 pm     Post subject: Race Reward (__Zone Developer__ Discussion) |  |   |  |  
				| 
 |  
				| Smong had told me that eventually the ability to write your own reward (points_race) module will be added into the race module.  I'd like to share my ideas on the reward ideas I have come up with, and hope that maybe some other people might suggest some.  These would be formulas so that depending on the zone settings, a zone dev can modify a number to reflect that zone's concept. 
 Currently I have two modes:  time-based (Time Trial) and place-based (Competitive).
 
 
 	| 
ArenaPlayers*RewardModifier/Place
 
 | 
 
 In this example, points would be divided evenly across the players according to standing.  So if RaceModifier was set at 100, there were 50 players, then the results would be:
 
 1 - 5000
 2 - 2500
 ...
 25 - 200
 ...
 50 - 100
 
 Every player who finishes gets points.  With the current race module, every player must finish, but that will change.
 
 
 	| 
if( place != 1 )
 ArenaPlayers*RewardModifier/(1stPlaceTime-Yourtime)
 else ArenaPlayers*RewardModifier/1
 
 | 
 
 Here, the point distribution is based on how well you did versus the 1st player's finish time.  This is probably a better test of race skill (kills, speed, etc ...).  If there is a wide gap between 1st place and 50th at say 2 minutes, then the reward will be much lower.
 
 5000/120 = 42 points (rounded to tenths)
 
 You could also make this more intense by multiplying the player's standing by their time or the difference in times:
 
 5000/(120*50) = 1 point (rounded up)
 
 The difference in time would be the better alternative, and may result in a greater gap in point distribution.  Although this would penalize everyone.
 
 What do other zone devs think about a reward solution for racing?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Oct 07, 2004 10:25 am     Post subject: |  |   |  |  
				| 
 |  
				| Probably already know this, but race is broken in 1.3.2 due to changes. 
 What is different about CommandFunc in cmdman.h that is giving warnings in the following?
 
 
 	| 
--- asss-1.2.0/src/race.c       2004-08-13 13:43:20.000000000 -0400
 +++ asss-1.3.2/src/race.c       2004-10-07 10:11:09.000000000 -0400
 @@ -70,9 +70,14 @@
 #include <ctype.h> //isdigit()
 
 #include "asss.h"
 -#include "region.h" //rect_t
 +//#include "region.h" //rect_t
 #include "packets/speed.h"
 
 +typedef struct rect_t
 +{
 +        int x, y, w, h;
 +} rect_t; // From old region.h
 +
 typedef struct
 {
 u8 completedlaps;
 @@ -1097,7 +1102,7 @@
 pdkey = pd->AllocatePlayerData( sizeof(pdata) );
 if (pdkey == -1) return MM_FAIL;
 
 -               cmd->AddCommand("race", Crace, race_help);
 +               cmd->AddCommand("race", Crace, ALLARENAS, race_help); // needs arena param in 1.3.x
 mm->RegCallback(CB_ARENAACTION, ArenaAction, ALLARENAS);
 mm->RegCallback(CB_PLAYERACTION, PlayerAction, ALLARENAS);
 net->AddPacket(C2S_POSITION, Pppk);
 @@ -1112,7 +1117,7 @@
 mainloop->ClearTimer(timer, NULL);
 mainloop->ClearTimer(countdown_timer, NULL);
 
 -               cmd->RemoveCommand("race", Crace);
 +               cmd->RemoveCommand("race", Crace, ALLARENAS); // needs arena param in 1.3.x
 mm->UnregCallback(CB_ARENAACTION, ArenaAction, ALLARENAS);
 mm->UnregCallback(CB_PLAYERACTION, PlayerAction, ALLARENAS);
 net->RemovePacket(C2S_POSITION, Pppk);
 
 | 
 
 
 
 
  race-1.3i.tar.gz - 51.73 KB File downloaded or viewed 109 time(s)
 
 
 Last edited by i88gerbils on Mon Nov 22, 2004 7:45 pm, edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dr Brain Flip-flopping like a wind surfer
 
  
 Age:39
 Gender:
  Joined: Dec 01 2002
 Posts: 3502
 Location: Hyperspace
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Oct 07, 2004 1:18 pm     Post subject: |  |   |  |  
				| 
 |  
				| void CommandFunc(const char *command, const char *params, Player *p, const Target *target) 
 This means adding const char *command in most cases.
 _________________
 Hyperspace Owner
 
 Smong> so long as 99% deaths feel lame it will always be hyperspace to me
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Smong Server Help Squatter
 
  
 Joined: 1043048991
 Posts: 0x91E
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Oct 08, 2004 3:44 am     Post subject: |  |   |  |  
				| 
 |  
				| By just looking at the diff it seems ok, I haven't got the facilities to compile or anything as I moved house and forgot my boot disk and blank floppies. But later today I might be able to freeload Visual Studio  (although possibly it contains .NET  ) |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Oct 22, 2004 1:27 pm     Post subject: |  |   |  |  
				| 
 |  
				| No, the warnings did mean something :P  Thanks Dr. Brain.  Got back to this problem, and had to change CRace definition besides the changes to AddCommand. 
 blah.  .patch or .diff attachments not allowed.  Silly MineGoBOOM.
 
 
 
 Okay, this contains a diff from the race in the race directory to the source directory.
 
 I think I got one segmentation fault starting a race, but it did not repeat itself.
 
  race-1.32.patch.txt - 1.86 KB File downloaded or viewed 169 time(s)
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Thu Nov 11, 2004 11:45 pm     Post subject: Race 1.3i |  |   |  |  
				| 
 |  
				| Okay.  Time to stop bothering Smong with silly race stuff.  Here's v1.3i. 
 This should work.  Compiled and tested on my machine.  If it doesn't work or you have problems tell me about it.
 
 All documentation should be included in the archive.  Prettied things up a little.
 
 
 	| CHANGELOG
11/05/04        v 1.3i          i88gerbils
 
 * "i" branch started ;-)
 * RaceReward hack, does not use a separate module.
 * RaceDelay timer added to set maximum race time.
 * AutoRace functionality added to start races automatically.
 * InStartToPlay changed to spec OR ignore non-racers.
 * stats->SendUpdates works.  Now scores will update immediately.  Yay.
 
 | 
 
 
 	| TODO
* RaceMinDelay                                  min=0
 
 Minimum time needed to passa checkpoint before being disqualified.
 
 
 * RaceRewardMode
 
 Add in a new race reward mode based on time.  This will probably be
 players^2 * RaceReward / rank / (mytime-1sttime) [except for 1st place racer of course!]
 
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SuSE Me measures good
 
  
 Joined: Dec 02 2002
 Posts: 2307
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 12:01 am     Post subject: |  |   |  |  
				| 
 |  
				| 7-zip (or p7zip) is your friend 
 
 
 7-zip uber owned
 
  race.7z - 41.61 KB File downloaded or viewed 108 time(s)
 
 bzip2 owned
 
  race.tar.bz2 - 50.8 KB File downloaded or viewed 110 time(s)
 
 
 Last edited by SuSE on Fri Nov 12, 2004 2:15 pm, edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.
 
  
 Age:38
 Gender:
  Joined: Feb 06 2004
 Posts: 2583
 Location: The Netherlands
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 2:09 am     Post subject: |  |   |  |  
				| 
 |  
				| OMG UBER OWNED $$$. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| i88gerbils Oldbie Server Help
 
  
 Gender:
  Joined: Dec 13 2002
 Posts: 423
 Location: OH
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 1:16 pm     Post subject: |  |   |  |  
				| 
 |  
				| Yay saving about 2 seconds of d/l for dialup users... |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dr Brain Flip-flopping like a wind surfer
 
  
 Age:39
 Gender:
  Joined: Dec 01 2002
 Posts: 3502
 Location: Hyperspace
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 2:08 pm     Post subject: |  |   |  |  
				| 
 |  
				| If you factor in the time it takes to download 7zip, it actually takes longer. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SuSE Me measures good
 
  
 Joined: Dec 02 2002
 Posts: 2307
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 2:18 pm     Post subject: |  |   |  |  
				| 
 |  
				|  	  | i88gerbils wrote: |  	  | Yay saving about 2 seconds of d/l for dialup users... | 
 I didn't mean it as an insult, yeesh.
   
  	  | Dr Brain wrote: |  	  | If you factor in the time it takes to download 7zip, it actually takes longer. | 
 Well, the point isn't just to save download time, but download time and bandwidth and space.  Also the bigger the file, obviously the more noticeable the bonus.  Besides, you (probably/hopefully) downloaded something to handle .tar & .gz, so there!
   |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dr Brain Flip-flopping like a wind surfer
 
  
 Age:39
 Gender:
  Joined: Dec 01 2002
 Posts: 3502
 Location: Hyperspace
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 4:15 pm     Post subject: |  |   |  |  
				| 
 |  
				| We ASSS people work in Linux. "tar zxvf" does the trick for tar.gz. 
 Of course, in most cases "tar jxvf" will do bz2.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SuSE Me measures good
 
  
 Joined: Dec 02 2002
 Posts: 2307
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 7:12 pm     Post subject: |  |   |  |  
				| 
 |  
				| ...so?  You still had to download something, even if it came with your distro.  I wouldn't be surprised if eventually you could do 7z a filename.7z file in some distro without downloading anything extra. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Dr Brain Flip-flopping like a wind surfer
 
  
 Age:39
 Gender:
  Joined: Dec 01 2002
 Posts: 3502
 Location: Hyperspace
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 8:07 pm     Post subject: |  |   |  |  
				| 
 |  
				| Why do we have to download it if it came with our distro? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SuSE Me measures good
 
  
 Joined: Dec 02 2002
 Posts: 2307
 Offline
 
 | 
			
			  | 
				
					|  Posted: Fri Nov 12, 2004 10:00 pm     Post subject: |  |   |  |  
				| 
 |  
				| Uh, I s'pose you could buy a CD and have it mailed to you. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| D1st0rt Miss Directed Wannabe
 
  
 Age:37
 Gender:
  Joined: Aug 31 2003
 Posts: 2247
 Location: Blacksburg, VA
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sun Nov 14, 2004 11:11 pm     Post subject: |  |   |  |  
				| 
 |  
				| or you could just get it through osmosis via the coolant system you installed when you overclocked your processor _________________
 
   
   |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| SuSE Me measures good
 
  
 Joined: Dec 02 2002
 Posts: 2307
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sun Nov 14, 2004 11:29 pm     Post subject: |  |   |  |  
				| 
 |  
				| could spawn it through your frontal lobe |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |