ElysionKronos for Thorium
Posted by Johannes Stein on May 1, 2010 in Uncategorized | 0 comments
I think I’ve already mentioned the Thorium scripting language here in this blog.
So without further ado, here is a preview version of ElysionKronos for Thorium: Click to download (2,1 MB)
It is very easy to use and if you have used Java/JavaScript and/or Unity3D before, ElysionKronos for Thorium will be really familiar to you.
It comes with five little examples (/samples folder), a short readme on the general usage and a PDF containing documention for functions of some classes.
Currently there is just a Win32 binary included, but you can recompile it for Linux and Mac OS X (well, just Intel platforms on Mac OS X). If you compile it for Mac OS X you have to add
{$PIC OFF}
somewhere in the thorium.pas.
Thorium itself is licensed under the MPL 1.1 or GPL/LGPL license, the Elysion Frameworks and ElysionKronos for Thorium are licensed under the MIT or MPL license. Parts of the Elysion Frameworks might be licensed under a different license.
Read MoreThorium Scripting Language
Posted by Johannes Stein on Mar 16, 2010 in Development, Games | 0 comments
So, I’ve been playing around with the Thorium scripting language lately. It’s a great project and I’m in the process of integrating Thorium into the Elysion frameworks.
The best feature is that I can use my Pascal classes directly in my script (if my class is derived from TThoriumPersistent and RegisterRTTIType is called with the correct parameters). I can declare the properties in my class and call these properties from my Thorium script without worrying about anything else.
This is a quick’n'dirty script I put together:
loadlibrary "core.std.io"
loadlibrary "elysion.kronos"
private elSprite sprite;
private elSprite sprite2;
private float angle;
private int al;
public void initialize()
{
angle = 0;
al = 0;
sprite = elSprite.create();
sprite.loadfromfile("test.png");
sprite.x = 128;
sprite.y = 128;
sprite2 = elSprite.create();
sprite2.loadfromfile("test.png");
sprite2.x = 256;
sprite2.y = 256;
printf("Initialize\n");
}
public void render()
{
sprite.draw();
sprite2.draw();
printf("Render\n");
}
public void update()
{
printf("Update\n");
angle++;
if (angle == 360) angle = 0;
sprite2.rotation = angle;
al++;
sprite.alpha = (al mod 255);
if (sprite2.onmouseover) sprite2.visible = false;
else sprite2.visible = true;
}
And here is the obligatory screenshot:

Graphics are loaned from Ari Feldman’s Spritelib GPL.
