The online racing simulator
InSim in Visual Basic 6.0
(17 posts, started )
InSim in Visual Basic 6.0
Hello coders,

Im trying to make an InSim app in VB6.
LFS doesn't accapt my ISI packet, it comes with the message: "InSim : packet received before ISI packet".

I'm sending this:

Declarations:
'//The struct
Public Type InSimInit
Id As String * 4
Port As Integer
Flags As Byte
NodeSecs As Byte
Admin As String * 16
End Type
Public InSimInit As InSimInit

'//Holds binary version
Public Type ISI
Bin() As Byte
End Type
Dim ISI As ISI

InSimInit.Id = "ISI" '// + zero?? "ISI0"? help
InSimInit.Port = 3002
InSimInit.Flags = 16
InSimInit.NodeSecs = 0
InSimInit.Admin = "pass"

LSet ISI = InSimInit 'Create binary

WinSock.SendData ISI.Bin

There is something wrong with the packet content, but i don't know what. Could be the Data Types. Anyone?
the packet id is ISI + char 0 (null)
With InSimInit.Id = "ISI" & Chr(0) or InSimInit.Id = "ISI" & vbNullChar it's not working.

It outputs this 24 byte binary package: "ISI ?Äpass " Is that correct?
I'v got it working
Stupid VB...
#5 - AJS
If you fill the byte array byte by byte and not with help of strings you should be on the safe side !

When you receive the data you´ll have to do deal with it anyway.
I tried byte by byte before, but all in seperate variables. Array works fine indeed
#7 - Stuff
I use InSim with VB6 too and made a few apps with it too.. Couple currently in development.

I posted a sample chat app here (post 30). Bob Smith later updated the OutSim program in the same topic so check for that too if you wanna do some OutSim.
Thx, but I already have everything working. Don't need OutSim atm, but i I'v worked with it before.

I'm ready for coding some tools, any suggestions?
Last time I was working on my project, I was doing some gap-message function, sending your own client some message about the driver in front of you and behind you about the gap + split/lap time. Quite more difficult than I thought
#10 - AJS
Is there an app which displays the (top ten) world record times and gaps for the sectors while hotlapping ?

That would be useful !
Messages to send are limited by 64k, some mods send (welcome)messages > 64k. How do they do that?
Only way that I know of is to just break it up into multiple lines
I'v seen it in a single line, strage...
MSO maybe?

Quote :struct MsgOutPack // 128 chars - LFS reporting displayed messages
{
char Id [4]; // MSO + zero
char Msg [128]; // displayed message, with colours removed
};

Nope, its not working with MSO.
can you post the source code ?
..... why VB6?


Im pretty sure you could do a hell of a lot more using VB.Net for insim.

InSim in Visual Basic 6.0
(17 posts, started )
FGED GREDG RDFGDR GSFDG