The online racing simulator
Searching in All forums
(263 results)
Stuff
S2 licensed
|x|_|_|
|x|_|_|
|o|_|o|

Stuff
S2 licensed
Here is my little way in VB6 to get rid of the colour codes Goes from 0-9 which is more than the current colours, but if more are added later it will pick it up.


Public Function StripColors(ByVal strString As String) As String
On Error GoTo StripColorsErr
Dim i As Byte

For i = 0 To 9
strString = Replace(strString, "^" & CStr(i), "")
Next i

StripColors = strString

Exit Function
StripColorsErr:
Call Report("-ERROR- StripColors() - " & err.Number & ": " & err.Description)
End Function

For the player controlled part.. Do you mean which is an AI and which is not? If so, just check the type in the NPL packet. (byte Type; // bit 0 - female / bit 1 - AI) If its 2, its an AI.
Stuff
S2 licensed
I made an example in VB6 and I also get 0 for every DirZ. Not sure about the path structure but I guess if we both get it, its intended.

Source.. use as you wish
Stuff
S2 licensed
Ah ha! Found it..

It was called LFSControl. By Scawen. To help with annoying restarts. Not on the site anymore but found a C/C++ source on RSC.

Here: http://forum.rscnet.org/showthread.php?t=141907 (post 58)
Stuff
S2 licensed
Yeah.. dunno how that would behave with .net. Not at all familiar with VB.net but I would probably scrap the API socket stuff in my later examples and go with some kind of .net winsock control..to start off at least. That is, if it has one

Most things I've heard about VB6 -> .net involves a major rewrite if not just starting over. So, I can't help ya much but post what you have anyway and we can see if we can get it to connect.

[EDIT] Oh! Wait! Messiah is making a project called LFS Live! That is .net 1.1 and will definitely help ya. Check it out: http://lfslive.sourceforge.net/ How could I forget that.. :doh:
Last edited by Stuff, .
Stuff
S2 licensed
I'm no C++ person either but don't forget the example Scawen posted? Hrm.. searched for it.. Where'd it go?
Stuff
S2 licensed
I was thinking of a server mod that someone could do. It would work something like this:

Someone records a custom "replay" of a pace car lap. Not a m/spr but a custom one.
Server loads the replay and programmitically drives the host car using the custom replay.
When needed, a replay of coming into or out of the pits can be played before or after the replay so they could drive into and out of the pits.

Recording the replay could be done similar to Kegetys' Ghost Car mod with OutSim. Then to play it, some type of direct input would be needed to control the car from the replay.

What do people think? Can it be done? Who could do it? Do you understand what I mean?
Stuff
S2 licensed
Little ol' me? Thanks for the consideration but it all depends on what you want to do. The okSocket I put together is basic for simple UDP packets that InSim uses but there are definitely other ways to accomplish a task. As a matter of fact, I'm working on a better version of my okSocket that will make it more robust for use with TCP sockets too. (HTTP stuff!) Or, you can do what I did and start researching winsock...

http://www.winsockvb.com is a good place to start. They describe the basics and go into depth on both the Winsock control and the API that I use. http://www.killervb.com also has tons of excellent, somewhat complex, code that will give you a good base for an InSim app too. Even more winsock info can be found here http://www.programmersheaven.c ... 5/articles/article324.htm And! Another place to get some great code is from the mixed site, Planet Source Code. Charles P.V. makes some great, easy-to-use, pure API, controls such as status bars, toolbars, listviews, trees, etc. I took from his code and even he took from Paul Canton with the self-sublcassing control/class/form.

Yes, tons to soak up for what seems to be a simple concept but once you get into it, it gets complicated fast and turns into an art to get it working just right all the time, for everyone. Overall, no matter what ya do, we will be able to help ya out.
Stuff
S2 licensed
I might have a solution. Didn't read the whole thread so let me know if there is anything I left out and can include or answer later

My solution for NAL anyway, is a manager/webserver! See the screenie to see my test version in action. It connects to InSim as normal (or several InSims in the same window) and each InSim connection has several features: 1) Shows live data in the user list and you can chat. 2) Qualify manager. This keeps a list of everyone that has done a lap in the server and will send lap data via post to a php script or whatever. 3) Status updater. If nothing has been sent to a site after a certain amount of time, this will send server info (host*.txt stuff) to a web script. 4) A webserver! It listens on whatever port for GET or POST requests, can do logins, parses templates, act as a file host, user organization and a banned IP list.

Like I said, this is a test version and is slow going for development. At least while I have classes for another couple weeks. And in a few months after I learn more Java, I will redo the whole program in that. (that one is VB6 )

Look good? Any requests? UI advice? etc..
Last edited by Stuff, .
Stuff
S2 licensed
The way I check if those flags are set is to simply 'and' the value to the word and if it equals the value, the flag is set. Eg.

If(flags And ISS_SHIFTU == ISS_SHIFTU)
{
//Shift+U flag is set
}

Not too familiar with Java but you get the picture
Stuff
S2 licensed
Only way that I know of is to just break it up into multiple lines
Stuff
S2 licensed
Sorry for that site. It's my friends and its down for the moment Might be up in a week I hope. For now you can get it from my personal space.

The program Layout Thingy is more of a viewer, and only for S1 layouts at AU1. I do have plans to update it to work with the other major areas, S2, edit objects, etc.. but been busy lately so I don't know when that will be.
Stuff
S2 licensed
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.
Stuff
S2 licensed
Mine is fine. 9800 Pro 256mb. Catalyst 5.13s
System is AMD 2600+, nothing spiffy.
Stuff
S2 licensed
Silkswift made a mod to do that. Its part of the RaceManager Toolset. Called Gateway. Here's a link, not sure if its the best one, but its there
Stuff
S2 licensed
If someone is still looking for screenies to re-create the Top Gear track (again), here some is a pic that might help.. Just like the one Slopi posted except different line and some labels.. (not mine)

http://img376.imageshack.us/im ... foldtopgearcircuit1ng.jpg
Stuff
S2 licensed
Yes! HAPPY NEW YEAR! I survived!
Stuff
S2 licensed
If you're getting that, or esp "InSim: Admin password does not match" in LFS, make sure your admin pass matches. I think you can use /pass inside LFS to set it, but if not go into multiplayer, go to start a server and change your admin password then exit out of the server thing. Should work after that.

And it's like wheel4hummer said, its local any firewall port stuff doesn't matter.
Stuff
S2 licensed
Data from InSim would be possible. I did it with the objects from a .lyt file. Yeah, it is a pain to figure out the differences between LFS x,y and the image x,y.. Zooming is also possible. Check out this program I made for S1 layouts. Called the Layout Thingy. Only 0.52 still but I plan to update it for S2 and the other major AutoX layouts eventually.

Since my LFS space is down for a while, you can get it from my personal webspace.. LayoutThingy052.zip (1mb)
Stuff
S2 licensed
If you just want the image, then F1PerfView can do the trick. Just record a .raf file and open it with the program. It has the whole track, not just the configuration. It outputs something like the attached image. (That's one of my mouse laps using the UFR.) After you have the .raf loaded, take screenshots, put them together, then take out the line. Not too hard
Stuff
S2 licensed
Well, I'm not really about the real solution, but here's what I changed:

- I deleted all the .ghost files from ghostcar\ghost folder
x in cfg.txt I turned off OutSim. I turned it on earlier from testing a different mod
x in the ghostcar\config.cfg file I turned on debugging

Other than that, I dunno what else to say?

Edit: Hmm.. I turned OutSim back on and debugging off and it still worked for me. My only advice now would be to delete the .ghost files. Maybe they are corrupt sometimes?
Last edited by Stuff, .
Stuff
S2 licensed
Well.. umm.. it works! :yipee:

At first it did the same thing when I just tried the same thing I did yesterday. But I downloaded DebugView, turned on the debugging from the config file, deleted the ghost car files so I could get a faster time and sped around. The line popped up and my ghost started following me! I have never been happier to see a ghost.

Now you have the other heif star you deserve!
Stuff
S2 licensed
First off.. very nice mod Kegetys!! 4 and heif stars out of 5

I'd give you all 5 but I'm getting an error when I cross the finish line that won't allow me to use it. It says:

ERROR: gcPath CreateVertexBuffer failed!

Did just as it said. Copied the files to the root of my LFS folder and executed LFSGrun.exe. It connected to both InSim and OutSim and said it was ready. The split differences show up, the /ghost switches are all enabled, using 1.01, etc. What should I try next?
Stuff
S2 licensed
Very nice! The track plots nicely and the telemetry stuff looks good.

However, two things that I would change. You might already have plans for this but just in case.

Doesn't show on my taskbar. Have to minimize stuff or move LFS to find it. Other is you can't move the popup forms. They hold the most info and once they popup under the main form, they don't popup anywhere else.
Stuff
S2 licensed
Ahh good. Just making sure to avoid any silly problems later.

For moving the ReceivedBytes over to a module, I have a somewhat simple solution: use a class module and WithEvents to respond to the events. Goes like this..

1- If your handling code is not already in a class module, stick it in there. Normal, .bas modules won't work with WithEvents.
2- Instatiate the new class on startup..
Private myObject As Class1

Private Sub Form_Load()
Set myObject = New Class1
End Sub

3- in the class module, use WithEvents..
Private WithEvents theSocket As okSocket
'after typing this, theSocket and its events will be selectable from the dropdowns

Private Sub Class_Initialize()
Set theSocket = frmMain.OutSimSocket
End Sub

Private Sub theSocket_ReceivedBytes(lngSocket As Long, bytData As Variant, lngLength As Long)
Debug.Print "we have bytes!"
End Sub

Of course, keep the little socket control on the form. Should work for ya. If not, I will post an example too. Let me know. :up:
FGED GREDG RDFGDR GSFDG