Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Lap Timer Script

Gary Hazlitt
Registered User
Join date: 14 May 2006
Posts: 3
01-11-2007 19:41
Hi there,

Does anyone have or fancy having a crack at a race timer script. I started it but there are many other things on the build to be getting on with. The brief is as follows

This is for a whole sim race track (and a sky time trial loop).
1 There will be a leader board for the top 10 times - avatar name and time
2 The avatar in the car will pass through a phantom prim sensor that starts a timer (this then tells them they are being timed)
3 They will have to pass through four other sensors around the course (to stop cheating) but also read out to them sub lap times - as they try to beat other times
4 When the pass through the first sensor again it tells them their time and a short message.

Notes: the track is one direction only - so the first sensor can only be triggered if travelling the right way -so probably two connected prims there.
The other sensors around the track obviously only respond if there is a 'timing' scenario taking place ie: the avatar has triggered the lap timer

If anyone has something that exists close to this or fancies a small commission please get back ASAP - launch in 3 weeeks ;-)

Regards Gary
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
01-11-2007 20:40
The biggest problem we ran into at Go-Go's mini racing was that the carts are all rentals. So all the carts technically belong to me. So all the existing track timers would detect the collissions with "my prims" (think bullets.. same technique). there's no really good way to detect the avatars attached to the carts. So basically with 4 carts in a race, they all scored in as me doing laps in 1/4 of the time.

The workaround is to give people their own carts.

Not ideal in our case.

There's a long-term fix being planned out.. involving writing the driver's name to the name or maybe description of the carts, then having the track timer detect THAT information.

But as to having something you can just "install" ready in the box... check with Suku Ming. (with the noted limitations above).
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-11-2007 22:08
When the AV sits in the car have it register its own key and the av key with the score board/lap timer.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-12-2007 00:44
A second thought, why not have the timer in the car ?
Just have it report the times to the scoreboard.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
01-12-2007 03:55
From: Gary Hazlitt
Hi there,


Hi! I'm currently working on a racing system and you can see the current test version at Les White's Mooz sim. It will be a commercial product hopefully out within a week. It doesn't do everything you have listed but is probably the most advanced system currently around. I'm in the middle of a last rewrite (to add a few features and further optimisations) before final testing for the 1.0 release.

From: Gary Hazlitt

1 There will be a leader board for the top 10 times - avatar name and time

Has this and also a qualification mode which will support ranking fastest laps for up to 100 racers across a number of heats.

From: Gary Hazlitt

3 They will have to pass through four other sensors around the course (to stop cheating) but also read out to them sub lap times - as they try to beat other times

It doesn't have this. There was a conscious decision not to include this feature to keep active scripts, listeners etc as low as possible, leaving valuable resources for the vehicles. There is a small anti-cheating mechanism in that a minimum lap time can be set which prevents laps under that threshold.

From: Gary Hazlitt

Notes: the track is one direction only - so the first sensor can only be triggered if travelling the right way -so probably two connected prims there.


Unfortunately, there is a problem with using linked prims with llVolumeDetect (http://lslwiki.com/lslwiki/wakka.php?wakka=llDetectedLinkNumber) which means this would need to be done via two objects communicating via whisper. Again it was decided that the cost of implementation (in sim resources) outweighed the benefit of automating something the race marshals should catch.

Other features:
The gate is reversible via menu so will support racing in either direction.
Endurance mode (currently being added) to allow timed races where most laps done decides the winner.
Team mode (also under development) to allow multiple racers to register for a single team, allowing for races with racer changes.
Practice mode, times all comers without need to register.
Rental vehicle support - needs small modification to vehicle scripts (as per Winter's Go-Go cart problem)
Custom starting gates. comes with a straight and staggered gate for ground tracks, others can be added easily.
IM/Email race stats.
Default config supports 10 racers. This can easily be increased if needed.

Feel free to contact me if you need further info.