PDA

View Full Version : Stafford 500


oopster
2009.04.20, 08:41 PM
I'm currently watching Nascar, and noticing a lot of safety car periods so I was thinking. To add a bit of fun maybe, we could have some safety car periods too. I don't think it would take much to write a simple program, to randomly "announce" a safety car period where you can't overtake for a certain number of laps, which makes it a little interesting with stops for battery changes, tyres changes and restarts.

Programmers
2009.04.22, 06:19 AM
If you could write the program I am sure it would be cool. :)

oopster
2009.04.22, 06:33 PM
I've got the basic written now. If my maths are right, there's a 10% chance of a safety car, if we use it, we might even end the race under a safety car.

I've added sound to it, and closed the "pits" off for about 10 seconds after the safety car is announced on the track, then, because it doesn't know how long a lap is, I've allowed 10seconds for a lap, so, the safety car will be out for anything between 1 and 10 laps, with no safety car period for at least a minute afterwards.

I can change these rules, or add new ones, but I need to know pretty sharpist so I can get all the coding and testing done.

BrianMidnight
2009.04.22, 07:40 PM
I can change these rules, or add new ones, but I need to know pretty sharpist so I can get all the coding and testing done.

The 500 isn't run until June so maybe there is longer then you think?

Dusty Weasle
2009.04.23, 12:59 AM
I'll offer a suggestion- Rather than purely random Cautions, base them on actual wrecks.

If a car becomes disabled (flipped, stuck, broken, etc) such that it must be recovered by a person, this would bring out the Yellow Flag. You could further augment this with the computer generated Cautions which would simulate the random debris Cautions that occur in the real race.

(“There goes that Jock DeBris littering the track again”. --- Darrell Waltrip)

Below is the Safety Car rule I wrote for our Formula 1 series. (We ultimately didn't use this rule however as my drivers pitched a fit about it... :rolleyes: )

Just FYI since NASCAR is less known outside the States. Maybe stuff you could implement to make the event more accurate:
- In NASCAR land it's a “Pace Car”.
- Pits are closed on the first lap of a Caution. The field then goes a minimum of one more lap around, then restart on the next lap (Though its usually more, depends on cleanup time. Sounds like you've got this covered in the program).
- Restarts are double-file with lead lap cars on the outside, lapped cars on the inside.
- The “Lucky Dog” rule: The first car one lap down when the Caution comes out may drive around to get back on the lead lap, unless that driver brought out the Caution.

-------------------------------------------
Safety Car
e.14. If a car becomes stuck or disabled, the driver calls “Safety Car”.

e.15. All cars must slow to about half speed. A Track Marshal calls the running order and drivers form up single file behind the leader, maintaining about a two tile separation between them. Passing is prohibited.

e.16. When no Marshals are available, the disabled driver must check the scoreboard and call the running order before retrieving his car.

e.17. The disabled driver may now cross the track to free or retrieve his car. This is the only time a person is permitted on-track.

e.18.If the car is still operable, the driver is to form up at the end of the line.

e.19. When the involved driver calls "clear", the field returns to Green Flag racing when the leader reaches the Start Line. No passing is permitted until past the Start Line.

e.20. If a driver damages another car while stepping across the track, he is disqualified.

e.21. If a car can still move with enough control to not be a hazard it must be driven to that driver’s pit area for removal and is not eligible for a Safety Car.
-------------------------------------------

Oopster, help me cheer on Mark Martin! Yeah Mark!

oopster
2009.04.27, 12:09 PM
Well I was basing the rules based upon the current F1 rules, since we're more likely to know what they are. As soon the pace car is on the track, the pits would close, for at least 1 lap (i've made 1 lap approx 10seconds), then the computer would annouce how long the pace car would be out for, a random number between 1 and 10. I'll compile the program as it at the mo and send you a copy if you want. PM me with your email address if you want a copy.

hrdrvr
2009.04.27, 12:22 PM
^ Id like to get a copy, but could I implement other things into it besides just the safety car? Id like to have a rain period announced, and maybe a few other things. Would your program be easy enough for me to mod/add thigs to it? Ive got an 8 hour enduro coming up, and was thinking I would make some random events (safetey car, rain stage, night stage, etc..) on small pieces of paper and draw them out every now and then. With a program like this, the whole event could be totally random!

oopster
2009.04.27, 12:26 PM
at this stage, the program is extremely basic, but it shouldn't be too difficult to make the neccessary changes to it, I'd just need to know what you want changing.

oopster
2009.04.27, 12:39 PM
if anyone wants the program, (note: which is still in development at the mo') email me at sarah at sldmodels.co.uk with the words "send me miniz500' in the subject line, and if my pc is online, you should get a copy by return email.

oopster
2009.06.03, 08:01 AM
A beta version of the program is now available, simply send me an email at sarah@sldmodels.co.uk with the words, "send me the miniz500 program" in the heading and you'll be sent a copy by return email automatically, assuming i'm online at the time.