Add physics engine and scripting capabilities to my application. I know for scripting capabilites I can use XojoScript but I would like to use something more well known/popular/industry standard, if you get what I mean.
I am probably sorted with the Lua script plugin but I am not sure about as it has some scripting features missing like select case. Maybe not a that of a big deal really. BUT NOT FOR THE PHYSICS ENGINE.
Einhugur has a LUA Plugin for RealStudio. I haven’t checked it for Xojo, but I guess it would work without problems.
Using LUA and XojoScript are perfect examples of using scripting languages to your engine, and you can even mix both if you like to use LUA extensive libraries with XojoScript LLVM script (or request a LUAJIT plugin).
In fact, one of the main reasons why I decided to switch to Xojo was its Scripting capabilities. Xojo Script is Basic syntax and I was able to move stone-age old functions I once wrote in WordBasic to a Xojo application, with almost no change.
Also, as I’m familiar with VBA, I could start writing (Xojo-) application specific scripts with practically no learning curve .
And I still consider the BASIC syntax as an industry standard. Whoever has learned to do some programming, will probably have learned some BASIC…
[quote=41370:@Amando Blasco]Einhugur has a LUA Plugin for RealStudio. I haven’t checked it for Xojo, but I guess it would work without problems.
Using LUA and XojoScript are perfect examples of using scripting languages to your engine, and you can even mix both if you like to use LUA extensive libraries with XojoScript LLVM script (or request a LUAJIT plugin).[/quote]
Would it be less efficient to use Lua at the same time as XojoScript?
XojoScript uses LLVM compiler which is (quite/much) faster than Xojo code and it’s a fantastic and very complete subset of Xojo language. You can move some of your Xojo code to XojoScript to get faster code, avoid recompiling the core, etc. Lot’s of benefits.
LUA also can be used to allow third party libraries (written in LUA) and is a language very popular among scriptures (CoronaSDK, as an example). I don’t know if some plugin developer plans to add LUAJIT to make it faster than LUA or any other derivates created. LUAJIT would run your code faster than LUA. In any case it brings a well known language for your customers.
Mixing both… Won’t make your code faster, but will bring you more possibilities of scripting languages for your project. LUA is quite popular and as Olivier greatly said, XojoScript allows to move code from Xojo (meaning you can recode your scripts without having to compile the core, and getting the benefits of LLVM as well).
I use both in my project, but is Linux console daemon, so sadly I can’t make use of VanHoek’s Script, as I wish. That’s why I did not include it on my post.