Jump to content

RvEYoda

Members
  • Posts

    2586
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by RvEYoda

  1. Sorry no I stopped working on it, since there really wasn't much interest. Maybe if I start playing f3 myself in the future I'll look in to it. Anyone with Scala/Java knowledge is ofc free to take over the (incredibly messy) source code :).
  2. I'm pretty sure that any dcs mpcd would easily cover all of leavu/gear's rudimentary functionality and a lot more. Leavu was just a cool project to bring the fc2 eagle up to something a little less ... primitive ^^. Just consider the ka50 and a10c implementation which are both pretty darn good. Personally I didnt enjoy the schoolbus flying of the 10c, but the ka50 was a LOT of fun to learn and fly around in!
  3. Got help from another forum member on skype. Some commands work. Like setting radar elevation. but no joy on cursor position so far. Update: Issue solved. Used a home made remote lua console (RMI sort of) to the dcs/fc lua environment :). Looped every number from 2000 and above. Guess what 2130 turned out to be :) (tdc x!). Oh and 2131 is tdc y!
  4. In Fc2 it was possible to control stuff like radar angles, cursors etc by using the appropriate LoSetCommand(id, params) Fc2 had a file (the name of which I don't remember) which showed all the commands (not only those outdated ones in export.lua), but the actual ones used by the sim itself! Now though, I've grep:ed through the entire Fc3 folder for an hour or so, finding nothing! And the command ids from fc2 that I want don't seem to work at all :/. How would I go about creating lua input for "place radar tdc x at 0.5" in fc3? in fc2 this was LoSetCommand(2103, 0.5) in fc3 this command doesnt do anything (no error, just no effect) commands like LoSetCommand(156) still work though (cycles hud color)
  5. sparse matrices dont actually consume memory until you put some nonzeroes in it. Useful for huge (>1000x1000) diagonal matrices, equation solving etc. essentially just a list of indices and values, instead of a preallocated n by m block.
  6. Long time since I worked on modding dcs/fc, but back in the day there used to be temp/error.log files which (among other things) listed lua errors if you wrote something wrong in for example export.lua. Does anyone know where these error logs have gone for dcs world? I checked AppData\Local\DCS AppData\Local\TEMP\DCS but no error logs there.. Using DCS world with fc3 beta
  7. Very short question. Is there any interest in having a leavu style MFD application for Fc3? If you think so, let me know on Skype so we can set up some test environments. Depending on how many want it and are willing to put in some test time (on Skype), I will decide if to make one or not :). If you don't know what leavu is, check:
  8. Well I recently started working on a prototype MFD for Fc3, but I haven't done much more work than draw a few shapes so far. I don't play fc3 (at least, not yet), so I'd need some idea how much people really want it. Leavu has such horrid code so I figured I might as well rewrite it from scratch - but like I said, I got a lot of other projects going right now which, at least for the moment, have higher priority. Oh and if the guy making AISTV or someone else wants to make a dll which we can use it to inject it into the game and replace/complement the standard mfd texture that would be cool :P. That might also allow us to pull the VSD and SMS views.
  9. Any chance we could see the source code for the dll hook part? I would very much like to make a 64bit compatible injection dll, but since I don't know assembly I've been stuck with microsoft detours as a solution(replacing the d3dcreate function), but it doesn't have free support for 64bit(it cost 10 k$...).
  10. Sorry everyone I have not answered. Since i did not see any replies I thought nobody was interested :), and I only visit these forums quite rarely nowadays. Basically I made a working proof-of-concept setup, by using the transport layer described above coupled to a general lua table->JSON format converter. I do not intend to put any license on the protocol nor the lua side of things. Though I might put some restrictive license on for example java implementations for the other side. If you would like to try the current implementation then please contact me on msn (and I should be able to answer most times of the day) ancient_banana_tmuk ------ AT _____ hotmail===dot===com Don't try to email this address though, it's only for msn.
  11. If you need any help, I already made such a tool (though for BMS) using the exact same principle :). http://www.benchmarksims.org/forum/showthread.php?10677-Beta-Release-GPT-(cockpit-texture-extraction-remote-cockpit-control-shm-mirror). I recommend spawning a slave thread inside the game process which can handle the data compression and transmission. (I send displays as jpeg frames over network, but ideally you'd want a dedicated video stream.) If anyone is curious about performance: On my system I cannot measure a performance loss at all anymore with the latest version, though others on other systems have reported as much as 40% fps loss (This can be due to lack of asynchronous texture download support in the gpu drivers, lack of free CPU core for frame encoding or similar issues). The key is to use double (or triple) buffering (extra textures) in video ram that you download from these copies to system ram (you NEVER lock and download the actual texture that the game is drawing to), and you enqueue the download operation at intelligent times, so that it is performed in the background asynchronously over the course of a whole game render cycle. Then when you have the full frame downloaded to system ram, you encode it using an extra cpu thread so that cpu/gpu cost for the game is absolutely minimal. This way I can download, encode, and transmit frames 1200x1200 at 50 Hz over TCP, and like I said on my system I cannot consistently even measure any performance loss.
  12. No you misunderstand: the low level binary format is not a replacement for sockets. It is type of encoding of what is sent over sockets - BUT NOT TO DCS/LOCKON :). I've made two low level message formats: 1 binary format 1 string format I use the binary format all the time once data is outside lockon (between my different computers and programs) and I use the string format to communicate between lockon's lua and my translator application: And this is sent over luasockets!:smilewink: ---------|----- STRING FORMAT ----|--------------- BINARY FORMAT ---------------------------| sim <-> lua <-> luasockets <-> translator <-> data bus <-> data subscribers and distributors (the translator can be both) In another example with a program which does not use lua but dll hooks: -------------|------------------------------------------- BINARY FORMAT ------------------------------| sim <->C/c++ dll <-> sockets/shared mem <-> translator <-> data bus <-> data subscribers and distributors You can install this hook into _any_ lua environment supporting luasockets. It turns _any_ lua environment into your own personal compiler :). You may inject _any_ script you wish ;). Obviously though, the environment needs some cycle/iteration hook to use. There is also multi-client support so multiple sessions may connect to the lua tcp server simultaneously and feed it with different scripts. Each client object on the lua side maintains its own set of scripts. (except for those saved on disk obviously ;)) From lowest to highest level: sockets <- luasockets <- low level message format and protocol <- high level message contents <- data/script contents Example input from java: @Override protected void onConnected(final long timeMillis) throws IOException { super.onConnected(timeMillis); try { // Upload and load all scripts we need uploadScriptFile("lua/lockon/FlightDataExtractor.lua"); loadUploadedScriptFiles(); // Activate cycle callbacks clearCycleables(); addCyclefcn("exportFlightData"); } catch (final SizeLimitExceededException ex) { ex.printStackTrace(); } } The flightDataExporter example above sends a JSON-formatted, LL string format wrapped message Example msg input to java from lua @Override protected void onNewMsgs(final ArrayList<ParsedMessage> msgs, final long timeMillis) throws IOException { super.onNewMsgs(msgs, timeMillis); for (final ParsedMessage pm : msgs) { final String msg = new JLuaSockIfMsg(pm).getDataAsString(); if (!msg.equals("HEARTBEAT\n") && !msg.equals(equals("EXIT\n"))) { try { final JSONObject parsed = new JSONObject(msg); final Map<String, Object> map = Utils.JsonObj2Map(parsed); Utils.printMap(map); } catch (final JSONException e) { e.printStackTrace(); } } } } ...*which can be made into human readable form: http://gigurra.se/loXport.txt .
  13. . Lua Sim SDK and TCP Sim data transport layer Background Some of you who know what Leavu/Lrm/Gear are might find this background useful. After Helios with its superb UI made new instruments for Gear/Leavu redundant a while back, I have been thinking about new projects to try out. Helios made me realize a few things, among others that I should not try to make an external instrument software which is as complicated as a small operating system and requires you to program your own gauges. Instead my focus shifted to thoughts on generalizing and simplifying the development of tools for others, and creating a more general data transport layer for communication sim<->instrument tool, compatible with as many future products as possible. And being able to load different tools and instruments from different applications, but use the same data transport layer. The two main problems I had when making leavu-like software (and I think others faced as well): 1. How incredibly unpractical the lua development environment is. Often you have to restart the game just to reload a script or alt tab out to read a log file to see debug prints! (at least for someone used to a nice big IDE with project overview and lots of auto-generation features :)) and proper console output. Coding with no compile time type safety and with a startup-shutdown time of sometimes up to a minute... 2. Each new game, a new data format, a new software is made, or a new interface is added to that sim for a specific external software. Instead the community could perhaps produce something more general together? Overview Since a couple of weeks back I have been working on a new project, which probably won't entirely remedy the issues above, but maybe we can try to help each other out here. Before you think this is just a preliminary discussion: No. I already got a working prototype. ;). It's not intended to be locked to any particular language or IDE/tool, but I happen to like Java so that's what I have used for my client software. I intend to produce some tools that I will share with everyone that will let you use lockon /dcs/xplane as your custom lua compiler and runtime environment. This is achieved in two ways. First the idea of saving your scripts in the script folder (i.e. config/export/) needs to be removed. Instead scripts and custom behaviour need to load and unload dynamically when you want it to. Second, you obviously need a way to do this, so there should be a thin tcp server running as a standard/default script (this is the only custom lua content saved to the config/export/ folder). (IDE setup example, how I got it right now) Here I have uploaded the source file to lockon, WHILE lockon is running and enabled it. What if I get a lua error in the log here? Aw the lua code throws an error on line ... Edit the lua source in eclipse/insertYourFavoriteIdeHere and upload the new script. Don't ever restart fc/dcs :). I can run the uploaded script instantly or save a copy as a file on the "server" (server = sim). Of course, your uploaded script can also be things like flipping switches or changing map etc. (Perhaps change mission behaviour if we had such an interface in the dcs lua environment?) Ok what now, I've uploaded my script, it is extracting some data from the sim, hwo do I get it to my other machines ? Ok my proposal (and implementation) is this: Use a low level message format, (binary or string, depending on target, lua is better at strings, binary is better after data is outside the "lua world"), to wrap high level message contents. JSON (http://www.json.org/) seens particularly well suited for changing data structures, the high level message contents (we don't want to alter our message formats or data distribution layer just because we have a new simulator or new export functions). A few sample pictures below. (General concept of the data/command io, although not mentioned here, it would work just fine also with dcs, bms and probably also variants of MS FS) (Principle of sim data/command io and distribution) Example of the low level binary message format I am using right now. NOTE: THIS FORMAT IS NOT USED FOR COMMUNICATION WITH DCS/FC LUA. IN THAT CASE THE LOW LEVEL STRING FORMAT IS USED INSTEAD. Example of the low level string message format I am using right now. I use this format between client applications and lua, since lua 5.1 doesn't have support for bit operations. License This is becoming a rather large project for me, so I'm going to put some limitations here. First, I will share the source with everyone, eventually, but it will only be free of charge for non-commercial purposes. If anyone does want to use it for commercial purposes (I will not mention names here, but I have been approached regarding this) then I would be willing to license it for you, ofc provided we can agree on price. :) Implementations I've made my implementations in java, but the data formats are all independent of programming language and hardware, so there is really no restrictions here. The lua parts are pure lua (except luasockets ofc which comes with fc/dcs). Maybe I should write a bus client that subscribes to autopilot status while I'm in the bathroom? ;P Instruments I hope that someone will pick this tool up and make something useful with it :). Contact You can reach me on msn, skype or email. (or phone?) Just PM me and I'll give you my details. .
  14. I think it's still available here: http://gigurra.se/Leavu2/
  15. Well, possibly, I started thinking of fooling around with it again if there is ever an Fc3. add me on msn ancient_banana_tmuk---()((AT))()---hotmail----------DOT--------com. If you cant decipher that then pm me and i'll sen you an unencrypted version ^^. Btw that is not an email, it's just for msn.
  16. Oh Hello, thought this thread was dead :). I scrapped Gear/leavu a while back when I moved to BMS 4 (where I use some other software). I think I may have also removed public accounts for the svn account. Well regardless, dont expect there to ever be anything like "leavu3" for fc series at least ;P.
  17. If there is any interest, I did write a test software capable of reading directx devices and binding responses to them as ordinary c++ functions. Source code is open to anyone who wants it. Generates DX data input formats on the fly so handles any number of devices, axes, povs and/or buttons. I would myself be interested in acquiring such a unit as you have in this thread....Did you design that pcb yourself, or was everything done from the start? (firmware also) Does it need any special drivers for windows 7? - I considered making a fake/software emulated hid device from my profiling software but from my understanding, that would require me to write some HID device drivers (which isnt such a bad deal I think as the documentation is out there), but MS enforces some driver certification which costs a lot of $ each year ... (well you can boot into test mode and run custom drivers but that's a bit of a mess)
  18. If TB includes an export.lua file, send it to me and I can check :)
  19. I believe most tb panels rely on the same local lua exports as do gear. Possibly some might rely on Global exports, I do not know.
  20. What is needed is support for multiple configurable cameras
  21. Multi monitor support with actual separate cameras sure would be nice. Locally or by using some slave computers.
  22. The video is a difficult subject. Nowadays I both agree and disagree with it. I absolutely believe it was necessary as evidence to convince people something had to be done. Although I myself never saw any actual increase in problems after it (probably the opposite), I can now see why it was trouble for people. But what do you do when u see something and you are 20 years old. (Go Go Go? :)). My goal, believe it or not, was that I wanted to make the game far more competitive (I wanted esports fc^^, and still do). To do that I saw a couple of ... problems you could say. These problems slowed down people from reaching higher limits. I believe that there should not be any artificial skill caps imposed by lack of software fidelity. I assume that 51st probably take that subject more serious than anyone, which is why, even though we weren't always on friendly terms, I kept telling people, GG also ;), that you should take up them as your hardcore testers for these subjects. I also wanted a couple of rve dogfighters pushing those subjects to the max but well,,, hubris is hubris ^^. I know you usually answer this "with teamwork you dont need.." well stop. There is NO harm in fixing a flaw in the software just because some methods aren't affected so much by it. Better to have those methods working even better, without the flaws in the first place. It may have been one of the reasons for making some of the fc1->fc2 improvements, as I was also involved in/pushing the process and had to prove that some of the problems did exist by making tracks demonstrating such things excessively. Even so, I am not sure I would do the video again today. I would be very careful first to see if there was going to be the possibility of a sim sequel, and even then I'm not sure. Btw whatever that pylon exploit/problem was I assume you sent a message to a tester @ ED or directly to them. Very possible I might send such videos directly to some ED testers or ED themselves though, if I think it can help, but I don't fly much anymore. I'm more interested in the engineering challenges at the moment. I tried challanging the devs to some LUA-fighter-AI competition, but did not get any replies ;P. Well anyway, shall we move back to subject? This weekend I should be able to start thinking up some new stuff, maybe do some testing. Perhaps we could organize some big test, if there is interest.
  23. check First page: http://forums.eagle.ru/showpost.php?p=1244976&postcount=5 .
×
×
  • Create New...