The online racing simulator
Searching in All forums
(132 results)
A.Fedorov
No longer welcome
May be use mci.x, mci.y i don't know another way.

or something like this
if ((racer enter pitlane) and (he speed < 10) and (penalty not stop'n'go)) {remember racer penalty; clear.penalty;}
elseif (racer have the remembered penalty) {To renew the penalty}
A.Fedorov
No longer welcome
Quote from mcgas001 :Hi guys. Im making a race control program and i need a little help in understanding something. If a player has a penalty in LFS like a STOP-GO LFS doesnt seem to send the insim packet IS_PIT when you pull into a bay. Is this normal or is there something im missing?

PSF doesnt seem to fire when its over neither...

If I correctly have understood you, all correctly works
use
struct IS_PLA // Pit LAne
{
byte Size; // 8
byte Type; // ISP_PLA
byte ReqI; // 0
byte PLID; // player's unique id

byte Fact; // pit lane fact (see below)
byte Sp1;
byte Sp2;
byte Sp3;
};


PITLANE_EXIT, // 0 - left pit lane
PITLANE_ENTER, // 1 - entered pit lane
PITLANE_NO_PURPOSE, // 2 - entered for no purpose
PITLANE_DT, // 3 - entered for drive-through
PITLANE_SG, // 4 - entered for stop-go
PITLANE_NUM
A.Fedorov
No longer welcome
I was wrong. not always 12 second. I look at replay and find mistake where i said earlier.

Time = 12 second + integer(number of racers on grid/2)

1 player - 12 second
2 player - 13 second
3 player - 13 second
4 player - 14 second
5 player - 14 second
Last edited by A.Fedorov, .
A.Fedorov
No longer welcome
My proof this is my script
A.Fedorov
No longer welcome
Quote from blackbird04217 :Before we start assumptions, which may or may not be safe and I am not pointing fingers, he never did say he tested on more then BL and thats why I am not believing the "always at 12 seconds" line until I see some serious hard evidence and more so then I timed it 100 times...

i have friends (S2) who tested this . Look up and run my script
A.Fedorov
No longer welcome
Quote from mcgas001 :You do realise thats totally wrong? theres only one track on LFS where the lights stay the same time and thats drag strip. Like IRL.

Attentive. The Gap before green light always random because gap before first red too random. The General time always equally. Look at begin race (after restart) and you see this.

edit config.lua (address and password) run and fun

note: for single game time = 8 second
Last edited by A.Fedorov, .
A.Fedorov
No longer welcome
I test this with lua script many times.
Traffic-light different start (first red ligth) but greenlight always start at 12 second

example.

(re)start
wait (2 second)
first red start on 3 sec
second red start on 4 sec
wait (7 second)
green start 12 sec

OR

(re)start
wait (5 second)
first red start on 6 sec
second red start on 7 sec
wait (4 second)
green start 12 sec
A.Fedorov
No longer welcome
Ок. i found IT! Your search stop.
use TINY_GTH and SMALL_RTP for get time. Greenlight always flash at 12 second.

if (ISP_MCI && one_pass == NULL) { TINY_GTH; }
if (ISP_SMALL && ISP_SMALL.subt == SMALL_RTP) {
time = ISP_SMALL.uval;
if (time >= 1200 && time < 1210) { echo "GO!!!"; }
one_pass = true;
}
Last edited by A.Fedorov, .
A.Fedorov
No longer welcome
i only suppose this method. No testing
A.Fedorov
No longer welcome
using TINY_RES
if (ISP_RES.ETime > 0) { GreenLigth = true; }
A.Fedorov
No longer welcome
Quote :1)Exist there any possibility how to detect the green lights (on start-semaphore). I am detecting the car-speed. But this is a bit dirty hack

may be use if it possible when race start time?
A.Fedorov
No longer welcome
Hi.
note: i look at timeframe (old version of mrpEdit). if timeframe/100 = approximately seconds from the beginning
A.Fedorov
No longer welcome
... and save result if LAPS (done some one) > define in config or not save if not done laps

saveLaps > 2

+ after save result run define command

execute = path\graph.exe
A.Fedorov
No longer welcome
what news?

I want make ircbot. Found http://www.endoneight.com/29_lua-irc-bot connected to my irc server, but don't know how use it with luaLFS
A.Fedorov
No longer welcome
if i press Ctrl+Shift i see date of race. (date and time) may be use this data if it possibly.
A.Fedorov
No longer welcome
Quote from nikka :Just FYI: This algorithm didn't work for me at all, dunno why.
But I searched the net and found this algorithm.. (look at "Code Sample"). The "polygon" in my case is simply a rectangle (the car).

I use it algorithm into last script.
Quote :
This seems to be spot on... tested with the UF1, and it's close to 90% perfect, the reason why it's not 100% is because it's hard to find the excact length and width of the car, and where the "centre" x,y of the car (reported by mci) is. I assumed it was in the middle of the car, but not sure if that's right

Never mind where center. It need for know peaks. We may get coords item of Layout. Put cone (you know coords it) and move car each of side. I think if use this method may be get more or less peaks of car.
A.Fedorov
No longer welcome
i have "warning" if not delete header in config.inc

what about this?

in index.php insert at line 9 ->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>

in config.inc delete line 8
header('content-type: text/html; charset=utf-8');

small bug
in array.inc at line 55 like this
,"F[B]O[/B]8"=>"Formula V8"

optimization
lapper.inc line 126 and 132 ->
$b=$c13;

link.inc line 83 ->
echo "<option value='*' selected='selected'>".$c13."</option></option>";

line 85 ->
echo "<option value='*'>".$c13."</option></option>";

Last edited by A.Fedorov, .
A.Fedorov
No longer welcome
rename index.html to index.php

in config.inc at line 8 like this.
[B]//[/B]header('content-type: text/html; charset=utf-8');

in links.inc at line 8 like this
echo "<form method='POST' action='index.[B]php[/B]?race=" . $race . "&drift=" . $drift . "' name='Auswahl'>";

A.Fedorov
No longer welcome
wrong Split L time. Because SP2 - time from start (not from sp1)
A.Fedorov
No longer welcome
Hi Gai-Luron!

Please make when race not ended (one of the driver not completed all laps) result not saved (or optional). Now it save all time and i have .tsv file without time data and graph.exe crashing.
A.Fedorov
No longer welcome
All you need is love

Really we need moment when it crash. At this moment sending many data but not received. IMHO
A.Fedorov
No longer welcome
It's bug of application. Somewhere on forum was description same problem. If interesting try search.
A.Fedorov
No longer welcome
Put link to PHPView. I think different structure of new PB.txt and old PB.txt
A.Fedorov
No longer welcome
May be connection slow speed. Buffer overflow.
A.Fedorov
No longer welcome
no
FGED GREDG RDFGDR GSFDG