Hi Ralph, Corjan,
I just install beta3 to update my ARCDU and test the new features.
I'm wondering if it's still impossible to use plain Java instead of Lua ?
Your core engine is still in Java and if Lua is great for small instruments (like any scripting in fact), it could be a pain when it becomes to have a lot of code.
I don't say it's impossible to write complex instruments, some guys in this community already did it with great result but it lacks of readability, modularity, tooling, ... which is, well, subjective.
I guess that we could have to start around c.s.a.a.o.AMBaseInstrument but don't want to start to try unless to have your advice to avoid any blocking stuff later.
Thanks
Complex instruments: still Lua scripting only ?
Re: Complex instruments: still Lua scripting only ?
With 3.0 there's only Java for the GUI. And it would become a mess when you can mix two languages.
Re: Complex instruments: still Lua scripting only ?
Ralph is right, the backend code executing the lua code is now written in C. This is done to improve portability to different platforms.
So you won't be able to execute any java functions from lua from AM 3.0 and up.
There are ways to further improve instrument structure, even in lua.
Biggest improvement can be to create multiple lua files, and store those is the 'lib' directory.
The lua files in the lib directory will be executed before the logic.lua is executed.
Corjan
So you won't be able to execute any java functions from lua from AM 3.0 and up.
There are ways to further improve instrument structure, even in lua.
Biggest improvement can be to create multiple lua files, and store those is the 'lib' directory.
The lua files in the lib directory will be executed before the logic.lua is executed.
Corjan
Re: Complex instruments: still Lua scripting only ?
OK.
Should we have a lib/ folder per instrument to avoid any problem between instruments ?
Should we have a lib/ folder per instrument to avoid any problem between instruments ?
Re: Complex instruments: still Lua scripting only ?
Each instrument has its own lib folder.
Re: Complex instruments: still Lua scripting only ?
Hmm... does that mean we can include C code snippets right into AM Lua, as it is already a native feature in Lua?Corjan wrote: ↑Sat Sep 02, 2017 7:21 pm Ralph is right, the backend code executing the lua code is now written in C. This is done to improve portability to different platforms.
So you won't be able to execute any java functions from lua from AM 3.0 and up.
There are ways to further improve instrument structure, even in lua.
Biggest improvement can be to create multiple lua files, and store those is the 'lib' directory.
The lua files in the lib directory will be executed before the logic.lua is executed.
Corjan
Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ
Re: Complex instruments: still Lua scripting only ?
I'm afraid that will be quite complicated. It might be that it is possible though.
Downside is that it won't be truly platform independent anymore, since you would have to build the extension for multiple architectures aswell (x86, x64, ARM etc.)
Re: Complex instruments: still Lua scripting only ?
Thanks Corjan
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ