mgh Posted April 16, 2012 Report Posted April 16, 2012 What are the relative merits of using Lua and C/C++ with FS, specially for those who have a good understanding of C/C++ programming?
Pete Dowson Posted April 16, 2012 Report Posted April 16, 2012 What are the relative merits of using Lua and C/C++ with FS, specially for those who have a good understanding of C/C++ programming? If you mean Lua for FSUIPC plug-ins rather than as a free-standing program-making language, then, just that, really. A small Lua plug-in can be knocked up in no time and run inside FS using the FSUIPC facilities, and developed by editing and reloading all within the one FS session. And for things only wanting a little intimate access within FS they are efficient because they are actually in-process. C/C++ programs on the other hand are many many times faster, and are ideal for larger externally run projects. What they lose in closeness to FS they gain in the speed of their own operations. Same really for gauges or DLLs running inside FS -- those written in C/C++ will beat anything in Lua for performance. Lua plug-ins are intended to allow easy user expansion of FSUIPC facilities. I added the interpreter specifically to avoid my having to continually program new features into FSUIPC itself. Really, from that point of view you can't compare them to proper C/C++ programs. You could make use of Lua for trying ideas out, ( "prototyping") before embarking on a proper C/C++ program. I did exactly this recently, running quite an extensive Lua plug-in to drive my hardware 737 multi-USB overhead, before writing a proper C driver for it. Regards Pete
mgh Posted April 16, 2012 Author Report Posted April 16, 2012 Thanks for your helpful reply. I did mean Lua with FSUIPC. I think I'll stick with what I know on the old dogs/new tricks principle. I use Borland C++ Builder and creatde a component that encapsulates the published FSUIPC code. This means I can simply drag&drop the component onto a windowed application, or create in on-the-fly with a single line for a non-windowed one. I can use the normal Borland debug facilities to check my application running with Flight Simulator and to make changes while it's still running.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now