The online racing simulator
I got a problem.

I downloaded the program, works great. I typed in the /insim 10000 and it worked. Then I tried to use my CSR sounds again, and now CSR isn't working.

EDIT: FIXED, when I downloaded CSR I needed to change the last lines in the CFG.txt file. (outgauge mode ect.) When I ran the camera it changed Outgauge Mode from 2, back to 0. So for anyone else who uses the Cam and CSR. Make sure the Outgauge Mode line reads "OutGauge Mode 2" after u have finished using the camera.

1 more question: If I change the port for the Camera, will it stop with problem, and will I be able to use CSR and the cam and the same time?
Quote from xaotik :Amen - this is much much better... now if only we could turn the view right and left (no problem if it's an extra hotkey [command with an insim prefix or something] and doesn't use the in-game left+right)...

EDIT:
Oh yes: it also won't let you enter the editor/free camera view (shift-u).

As a sidethought - maybe an extra command to enable/disable camlevel on the fly would be handy?

PS: If you flip the car over with CamLevel enabled it's hilarious - it's like you're not wearing a harness and you're tumbling inside the car like it's a washing machine.

Looking at InSim.txt, it seems the only way to communicate with insim apps is either by text messages, "/o whatever", or with on-screen buttons, neither of which are really useful for looking left or right while racing. The free camera is probably disabled by the same override that stops looking left and right from working.
#28 - FL!P
Very nice proof of concept! I Hope Scawen will try it, like it, and implement that feature directly in LFS.
-
(Rotareneg) DELETED by Rotareneg
Quote from Matt0snap :
1 more question: If I change the port for the Camera, will it stop with problem, and will I be able to use CSR and the cam and the same time?

Just checked, it's not my fault. LFS automatically sets OutGauge Mode to 0 when you use /insim to open any port.
Quote from Rotareneg :Looking at InSim.txt, it seems the only way to communicate with insim apps is either by text messages, "/o whatever", or with on-screen buttons, neither of which are really useful for looking left or right while racing.

D'oh, right - I keep forgetting it don't have "key down/up" events.

EDIT
I guess you'd have to resort to non-LFS related binding via DirectPython or something...
Probably a Vista thing, like different libraries or something. You might try downloading Python and running the camlevel.py directly.
You have to configure your firewall for camlevel.exe

<- Vista Business x64 here
I have modifed the program so that the config file can be customized more easily. For example, the order of the variables do not matter. They are assigned using "variable=value", and a "#" designates a comment. Also, all of the data besides the source-code and the config has been shrunk into the single exe. I also made it Python 2.4 compatible (No "Struct" methond in python 2.4) since I use 2.4 and not 2.5.
Attached files
camlevel_w4h_1.1.zip - 1.2 MB - 1580 views
Quote from wheel4hummer :I have modifed the program so that the config file can be customized more easily. For example, the order of the variables do not matter. They are assigned using "variable=value", and a "#" designates a comment. Also, all of the data besides the source-code and the config has been shrunk into the single exe. I also made it Python 2.4 compatible (No "Struct" methond in python 2.4) since I use 2.4 and not 2.5.

Thanks! I was hoping someone who knew what they were doing would come along and clean up the mess I made. Also, I just noticed a tiny typo in my code where it sends the IS_CPP packet: I accidentally left a "21" in the yaw rotation, should be zero:


insim.send(struct.pack(is_cpp, 32,9,0,0,0,0,0,0,pitch,roll,
255,255,90.0,camera_average,8192))

I'll drop the attachment from my first post and link to the post with your version, if you don't mind.
Just a thumbs up to the OP for making and releasing this insim mod. To me it adds that little thing that LFS was missing. The slower the car the more fun this makes it...XRG on AS cadet or SO is bloody fun.

Would love to see the final version released with the next official LFS patch.
Ideally (perhaps?) the camera would just take off the pitch and roll of the car relative to the ground, so that bankings and steep sections would remain unaffected. I don't think that is directly available from outsim though? Maybe it could be deduced from other information?
Quote from Rotareneg :[/code]I'll drop the attachment from my first post and link to the post with your version, if you don't mind.

Sounds good to me. I may add in-game control so that you can make the program stop/start and maybe adjust variables in game. By the way, the only reason I use python 2.4 is because pyGame only runs on Python 2.4.
Quote from Bob Smith :I don't think that is directly available from outsim though? Maybe it could be deduced from other information?

nope outsime is for acceleration cues so the pitch and roll are all relative to where gravity points to
might be possible to work the roads pitch out via insim position packets
Quote from wheel4hummer :By the way, the only reason I use python 2.4 is because pyGame only runs on Python 2.4.

Hey, would pyGame be able to access game controller input (like buttons) or would it moan about it being already accessed via DirectInput?
Quote from xaotik :Hey, would pyGame be able to access game controller input (like buttons) or would it moan about it being already accessed via DirectInput?

The pyGame window would require to be focused, so I don't think it would be possible to force it to be in focus, but still be able to control LFS. I will mess around with pyGame and see if it will detect keypresses in the background.

EDIT: Nope, doesn't work. I have no idea about joystick input.
Quote from wheel4hummer :The pyGame window would require to be focused, so I don't think it would be possible to force it to be in focus, but still be able to control LFS. I will mess around with pyGame and see if it will detect keypresses in the background.

EDIT: Nope, doesn't work. I have no idea about joystick input.

Ah yeah focus... I think wxWindows is able to register global hotkeys for keypresses in Windows but I don't think that would do much good if someone would want to map it to a controller without thirdparty s/w doing it (a la logitech profiler), so I guess it's all down to seeing if DirectPython could handle input in the background.
I get a "outsim closed" followed by a "Outsim enabled" every few seconds
Edit: Not with W4h's version
Quote from ACCAkut :I get a "outsim closed" followed by a "Outsim enabled" every few seconds
Edit: Not with W4h's version

Both versions do that. After 10 seconds of not receiving any outsim packets it closes and reopens the outsim connection. It shouldn't do it while actually racing, just while in the menus.
#44 - Jakg
Both on your and W4H's version it closes the second i join a race. I'll try re-opening it and see what happens.

Can anyone provide any videos of comparison about this?
Quote from Jakg :Both on your and W4H's version it closes the second i join a race. I'll try re-opening it and see what happens.

Sounds like a problem with the admin password, but I'm not sure. I only tested it in single player mode, but i'll try it in multiplayer.

EDIT: And, I think there should be a max_roll and max_pitch, but i'll mess around after ive done my HW
Works fine here , thx alot , great prog
Excellent work! Looks much more realistic in my opinion. I'd like to see this incorporated as an option in the game too.
Great idea turned into reality! Great to finally be aware of the roll of the chassis.

However if implemented in LFS it should be a selectable option. I thought about this after seeing the latest video of Force Dynamics new motion simulator. http://www.lfsforum.net/showthread.php?t=37739 Your own head would already do the same and more.

Actually thinking of that. In real life when cornering hard drivers would bend their neck opposing the lateral G's. Maybe there is a way to implement this effect into this application.
Quote from MillerM :However if implemented in LFS it should be a selectable option. I thought about this after seeing the latest video of Force Dynamics new motion simulator.

Already you can disable "acceleration moves viewpoint" for that very same reason I'd think.

"Real life" camera pitch/roll with InSim
(164 posts, started )
FGED GREDG RDFGDR GSFDG