APOCALYX is a...

free Game Engine based on OpenGL (MAIL) (SITE) (FORUM) (BLOG)

Tuesday, June 24, 2008

Preferred languages

The users answered the question about their preferred languages. The resulting list in order of importance is: C++ (21), Lua (9), Java (7), Python (7), other (5), ASM (4), C# (3), JavaScript (1), lisp (1), PAWN (1), Prolog (1), while AngelScript, CSL, Perl, REXX, Ruby and Squirrel were ignored.
As a first comment, we can say that C++ is the preferred language, then follow at a distance Lua, Java and Phyton. Since the poll was started to get useful indications about the scripting languages included in APOCALYX, I must say that the choice of Lua was a good one. Also Java and Phyton are popular, of course, but their main disadvantage is the requirement of large installation files and I prefer to link the script interpreter to the engine executable to avoid complex installations.
Another comment regards the scripting languages already included in the engine, Lua apart, that are AngelScript, CSL and SMALL (now PAWN). They don't seem necessary to any user, so I'm going to remove them from the next releases to reduce the size of the executable. Then other languages does not seem so necessary to anyone. Of course, I'm still going to support TinyC and FASM, because they are useful to optimize pieces of code where performances are critical.
Finally, a comment about the "other" option. A user told me that Pascal is a nice language too, especially in the Delphi flavor. Effectively the Nout's NsEditor is written in Delphi, just like the engine itself is written in C++. Another user suggested BASIC instead. This is not a bad idea since a lot of amateur programmers develop in BASIC and ignore other languages; he also suggested the ScriptBasic interpreter that seems very promising, since it possesses most of the Lua interpreter characteristics (easy embeddable and extendable), it provides also the well known BASIC syntax and I'm seriously evaluating it as an additional scripting language. The ScriptBasic author says:
"ScriptBasic implements a rich set of instructions that are available under Win32 as well as under Linux/UNIX. Programs written in ScriptBasic are portable unless you work hard to insert some system specific code.
If you miss some functions in the language itself there are external modules that implement several features, like CGI handling, MySQL access, regular expressions, graphical user interface, NT/UNIX specific functions (in case you really need something system dependant) and several others.
ScriptBasic is fast, it generates a compact internal code, which is interpreted. This internal code occupies a single, continuous memory chunk and is usually saved into a cache file. The cache file is automatically checked by ScriptBasic and thus it compiles the source only when needed.
You can also save this code into separate file and deliver it as your application without giving out your source code. This is to protect your intellectual property if you wish to use it. What is more ScriptBasic can be compiled to C and this way you can generate standalone executable on UNIX as well as on Win32 operating systems free of charge.
Finally: ScriptBasic is LGPL. This means that you can use it, alter it, extend it, embed it. The extra L before GPL says that you can embed it even into commercial application that you sell for money.

No comments: