GitOfMagic / rallyraid

Automatically exported from code.google.com/p/rallyraid
0 stars 0 forks source link

Controled speed zone in the village with penalties (I118) #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
 1) in the roadbook, a DZ shall be accompanied with the corresponding speed limit, 
    and the speed limit (the same, or a modified one) must be repeated in each 
    following note until the symbol FZ;
 2) no actual speed check seems active within the zone (therefore, the speed limit 
    can be broken without getting penalties).

Of course, you can choose to use the symbols DZ and FZ only for "aesthetic" 
reason in the 
roadbook (and this should be explained in the game instructions), but I would 
rather 
suggest to actually implement the speed check, in order to enrich the game with 
a 
further realistic feature! 
(So, this is my improvement suggestion I117.)
A quite simple implementation is possible: from the rdbk you can compute the 
extension 
of the controled speed zone (total distance from the DZ up to the FZ), then 
just 
measure the time spent by the Player to pass such zone (saving it in a 
temporary 
variable the precise time of entrance, and subtracting it from the precise time 
of 
exit from the zone); immediately after, you can divide space/time, getting the 
average 
velocity, and if such velocity is over the max allowed speed in the zone, 
then the penalty shall be assigned. 
This is of course an approximate method (because the precise distance covered 
by the 
Player, and therefore the precise speed) depends on the precise trajectory that 
will 
be followed, but I think it can work fine for the largest number of cases.

Original issue reported on code.google.com by balazs.t...@gmail.com on 31 Dec 2011 at 4:15