Hard Light Productions Forums
Modding, Mission Design, and Coding => The Scripting Workshop => Topic started by: coffeesoft on November 22, 2013, 07:30:38 pm
-
Hi.
I want to ask if is possible and which would be the way to extract the telemetry of the game to build a custom control pannel, i mean, speed, shield, weapons, etc ...
I want to know if with the Lua is possible to do, other guy from the forum, Podoo, he makes a good prototype but if i understood well, this program works like a mirror running on another pc, but is not using the real telemetry of the game.
I want to build a little control pannel from first, may be there are more people interesed, many thanks.
-
You should be able to write stuff in a file, and then read this file from another process, or if this file is on a shared network or something, from a process running on another PC.
Have not actually tested this of course, but that's how I'd start.
-
Ok, thanks for the info ....
-
You can also use LuaSocket (http://w3.impa.br/~diego/software/luasocket/) to do network communication but as far as I know that needs the lua dll in the location where your FSO executable is located to actually work.
-
The DLL´s are not a problem i think, i want to investigate how to use this data with for example an Arduino, to make some Digital Led display to indicate some values or other similar things.
Would be good to control some relays as well :)
-
Now looking on the Script of Podoo, i saw that may be is using LUA Socket as well, inside the code there is this line.
socket=require("socket")
-
Interesting idea. I'd love to have telemetry exported to a file which could be read later with a Python script to make a 3D plot of an object's path throughout a mission.
-
That´s cool :nod:
-
May be we can build together a standard telemetry file with all the data of the game, and after that the users can decide wich kind of hardware or software uses for his project.
The only problem from my side is that i don´t know how to program :banghead:, but any test are welcome.
-
The idea is build something like this ...
https://code.google.com/p/arduino-fs/ (https://code.google.com/p/arduino-fs/)
I like the digital displays for some values of the game ... :)
-
Did we ever see the Maker Diaspora flight sim developer on these forums?
Presumably they came up with a system of exporting telemetry data out of engine to their control panels and actuators. From the few interviews I saw, they did have more difficulty getting telemetry from FSOpen vs. the prior FlightGear-based system.
I would have assumed they used Lua in some way.
-
Wuau, nice project, but big for my room ;), anyway thanks for the info, i didn´t know.
My project is less complex, i want to use an arduino to use some displays, but the pannel inputs may be a keyboard hacked is ok.
For other data i want to use the Script from Frodo, a guy from the forum.
After the control pannel is finished ( someday... ), i will try to build a X-Sim cockpit, to do something similar but with less rotation.
For example a 3 DOF motion platform using X-Sim.
http://www.x-sim.de/forum/portal.php (http://www.x-sim.de/forum/portal.php)
This software has good features, for example you can use the simple Joystick translations to move the cabinet and use the Force-Feedback effects to shake it when you crash, enemies are shooting you or closer engines.
Also has a plugin-option that can read the OpenGL and DirectX information to use with the cabinet.
The only problem, all the project looks expensive :( , but step by step....
Here the test that i do with the native virtual simulator of X-Sim ...
-
These guys are now in www.kickstarter.com, for a not too expensive price, just $50 or more, they send you a
complete instructions to build your own cabinet, that is good. :D
Many thanks for the info again...
I will contact the staff to know if the code is fully compatible ( or more or less ) with other freespace open mods.
http://www.kickstarter.com/projects/vipersim/the-viper-full-motion-flight-simulator (http://www.kickstarter.com/projects/vipersim/the-viper-full-motion-flight-simulator)
-
These guys are now in www.kickstarter.com, for a not too expensive price, just $50 or more, they send you a
complete instructions to build your own cabinet, that is good. :D
You mean they were on kickstarter, back in 2012. You can't back a kickstarter more than a year after it ended...
-
Ups, you are right , i was too excited :lol:
-
The Designs Documents from 2012 are public....
https://sites.google.com/site/mf2012theviper/home (https://sites.google.com/site/mf2012theviper/home)
https://www.dropbox.com/sh/fbkwwg8pllhqau1/atGivG8D9C/Viper%20Backers (https://www.dropbox.com/sh/fbkwwg8pllhqau1/atGivG8D9C/Viper%20Backers)
-
Their 2013 project was the first to use Diaspora/FS2Open engine.
-
luasocket is the best way to talk to hardware i think. just use an ethernet enabled dev board, connected through a crossover cable, or a wifi enabled dev board. luacom also works but i think you have to run your packet decoding code in a co-routine, which is how i can talk to my arduino duemilanove (though ive never been able to have freespace talk directly with luacom, but i have been able to socket into loopback port and have an external script relay the data to luacom). thats kind of archaic anyway, so just use lua socket.
you can probibly do a usb interface through the cdc device class, but i dont think there is a lua module for this, you would have to build a module, use alien to talk to a dll that handles communication with usb cdc devices, or compile a middleware application as a go between between the usb device and the ip loopback port.
-
Useful information, many thanks :)
The script from Podo is using LuaSocket and works good, but the script must be optimized for better response and is a Alpha version.
Now i have a doubt, there is a software called X-Sim to extract the data from the games, normally racing and flight simulators.
This software has a plugin that is capable to extract the data from the DirectX or OpenGL while you are playing, normally people are using for motor controlled cabinets.
My doubt is wich kind of data will extract from FSO, because i don´t know wich data manage the OpenGL and wich one is exclusive of the game.
When i have a bit of time, i will build a little platform simulator of LEGO or something just to test it ( i have two small motors on the vault :D), anyway may be i must to buy some controllers for the motors.....