PDA

View Full Version : Deciding a scripting engine



Ñuño Martínez
06-10-2009, 02:11 PM
I'm thinking about a project for a near future (it means "some day after PGD-Annual'09" ;)). It will be a development environment (actually an IDE), and I decided to do it script-able. Actually all the functionality of the application will be written as script except the most basic actions (i.e. the kernel). Initially I planned to use Pascal Script but since the IDE will support different languages (unlimited thanks to the SynEdit engine) I'm now looking for a scripting engine that allows more than one language.

I've found FastScript (http://www.sharewareconnection.com/fastscript.htm), which allows to define a new script language from a XML file, but it's shareware.

I can improve my old BAScript (http://www.burdjia.com/descargas/#BAScript) virtual machine, which uses a FORTH-like low-level language and should be easy to write a translator (compiler) from other languages. I never used it for a real project and I know it needs a big improvement but I'm tempted to use it with a BASIC-like language and add more languages (C-like) in later versions.

An alternative would be to use Lua, which is popular and there are a nice wrapper by Eon Clash. ;) Unfortunatelly I never used Lua as language and most tutorials are directed for an specific purpose.

What do you think?

NecroDOME
06-10-2009, 04:59 PM
(What came to my mind was the .NET stuff. C#, C++, Java, Chrome(Pascal) etc. compiled to a the same intermediate language.)

- What you also could do is make an IDE and provide different compilers.
- -OR- as you need a runtime-environment, you can support there all the languages with the 'kernel' to guide everything into the correct direction.
For example: I make a program in Pascal script and I can call trough the kernel a function in some sort of Lua script.

I'm also still wandering around if I need to implement a scripting engine in my game engine. The thing is that I actually don't need it, but I want it for fun. Sometimes scripting can make things simple and quick without recompiling and/or restarting the whole engine.

Edit: I like the idea if the languages can work together somehow. btw, what is your plan to use it for?

Pyrogine
06-10-2009, 05:09 PM
Clicky (http://paxcompiler.com)

Not free but check it out.

Ñuño Martínez
06-10-2009, 06:49 PM
Edit: I like the idea if the languages can work together somehow. btw, what is your plan to use it for?

I don't want to explain it "clear" yet, but I'm not comfortable with current IDEs so I decided to do it by myself. The main idea is to do it flexible so users can add or modify its functionality in several ways: i.e. integrate a debugger or add an option to commit modified files to the version control system or to upload them to the web server, etc. But much more.


I'm also still wandering around if I need to implement a scripting engine in my game engine. The thing is that I actually don't need it, but I want it for fun. Sometimes scripting can make things simple and quick without recompiling and/or restarting the whole engine. Do it. I did it. It worth the effort. I did learn a lot. :yes:



Clicky (http://paxcompiler.com)

Not free but check it out.
Thanks for the suggestion, but I was looking for a platform independent solution, and it seems as it's only for iX86/AMD architectures.

arthurprs
07-10-2009, 02:45 AM
Python ;)

KidPaddle
07-10-2009, 04:45 AM
RemObjects Pascal Script: http://devcenter.remobjects.com/articles/?id={2FFC1EE9-F18D-4B11-9DE4-1BA0A79D0D04}

or, but not free, paxScript: http://eco148-88394.innterhost.net/paxscript, which supports Basic, Pascal, JavaScript and "C".

Thomas

NecroDOME
07-10-2009, 08:18 AM
maybe you like this idea: In every IDE you have to press a button, then it starts compiling/building whatever. You can also do that on the fly in the background. The user can type, and while typing, the code is build in the background. This way the user gets feedback after typing without pressing the compile/build button.

NecroDOME
07-10-2009, 12:38 PM
I'm throwing with ideas now :)

You could also add a function that could work together with SVN. If you for example add a file, that that file is also added in svn. Same for renaming/removing.

Edit: Compiling shader with the commandline shader compiler that ships with DirectX could also be a nice feature :)

Ñuño Martínez
08-10-2009, 08:24 AM
Python ;)
Same problem than Lua: I never used it. BTW, how can I use it from Lazarus/FPC projects?



RemObjects Pascal Script: http://devcenter.remobjects.com/articles/?id={2FFC1EE9-F18D-4B11-9DE4-1BA0A79D0D04}

or, but not free, paxScript: http://eco148-88394.innterhost.net/paxscript, which supports Basic, Pascal, JavaScript and "C".

Thomas

Thanks for the suggestions. I was looking for information about Pascal Script. It seems it's possible to use it in Lazarus/FPC but it needs some changes. I'm "studying" it.


... lots of interesting suggestions ... Really interesting. :D I did plan some of them as the SVN integration.

Anyway, as my IDE will have that scripting engine it will be possible to add that functionality as plug-in or extension (i.e. add a menu option to call the shader compiler ;))

NecroDOME
08-10-2009, 09:19 AM
Sounds nice :)

jdarling
08-10-2009, 02:10 PM
FORTH and LISP come to mind as great intermediate languages. You can easily convert from just about any other language into FORTH or LISP and execute those inside a virtual machine. Its easy to write "cross-compilers" in both languages and there are already tons out there. Also, implementing either is relatively trivial.

Just some food for thought :)

- Jeremy