Go to the seamless home page and click on download
Last year I started writing a script compiler for Seamless something I had wanted to do for years.
Late in the year I showed a few demonstrations to a few friends of my scripts in action but the events that piled up late that year robed me of ever having an official announcement of Seamless3d supporting scripts until today
The scripting interface is still far from user friendly in the sense that if you make one simple mistake entering a line of code the chances are seamless with crash but the robot does demonstrate how sweet things can be and how good its all going to be in the future
I did wonder about postponing this announcement further but I fear to many builders are getting tired of VRML's slow development and lack of support and because of this are moving on to proprietary formats. VRML is probably still currently the most popular 3d standard for the net but with so little progress being made in the right direction to make things a lot more exciting I feel it is the right thing to do, to unveil my C++ net script demo now!
To see the demo in action go to the F10 menu and click on:
help/worm animation
This is C++ code but if you output the example as a wrl the script is converted to JavaScript and will work in blaxxun contact!
Each time a line of script is entered by the robot seamless compiles all the C++ code but this operation is fast enough for it to appear to be no different to adding a line of code for an interpreted language.
This demo is based on my online worm animation tutorial except instead of using ROUTEs and extra nodes it is done more cleanly using C++ script.
Note at one stage you see the robot inserting 4 minus signs in front of 4 SFRotations (in front of the nodes they belong to). This is the equivalent of using the standard VRML JavaScript inverse() function but instead we are taking advantage of C++'s operator overloading using a minus sign operator. This is just one example of how C++ can actually be higher level than JavaScript to code. If the smls file is output while there is a minus operator being used this way the operators are converted to inverse functions so that a current VRML browser can make sense of them.
The interface hides a few things like the C++ curly brackets the same way the scene tree interface hides the curly brackets for VRML nodes. Having a tree view to handle the indentation like this makes my C++ code appear a little like python but if you look at the script code in the smls file using a text editor you will see the familiar C style curly brackets and the semicolons (end of instruction symbol) which too are hidden from the user in the scene tree window. I may make it in the future so that the curly brackets and semicolons can be displayed as an option for C++ coders who prefer to see them. Hiding the brackets and semicolons has the advantage though of reducing clutter in the scene tree and reduces the number of symbols a beginner has to digest.
The seamless library makes the code look very much like JavaScript. Perhaps the main difference in using Seamless script for scripting to JavaScript is all the variables types must be defined because C++ is not an interpreted language its a compiled one. This does not make C++ any less high level. Although strongly typed languages run much more efficiently its not just for the computers sake why many prefer strongly typed languages. Well defined types help the programmer too especially when making radical changed to lots of code. Letting the computer interpret to much to mean just about anything you give it, does not help yourself or the computer figure out just what it is you are trying to do and can also hide bugs.
Because this compiler compiles C++ code straight into native machine code Seamless must have one of the fastest web script engines in existence.
Speed isn't just something that lets you race, it lets you try things that other wise might be put off for the fear of it being to slow and so speed has a lot to do with how versatile a languages ends up being.
There are many scripting languages based on C++ but I don't want to go down the path of designing limitations into the language so that there is little hope of a standard C++ compiler being able to compile your online scripts for offline programs. By supporting C++ there is no reinventing of the wheel for the actual language. C++ has already proved it self as a most practical and versatile language for offline content, its the most popular language in the world, most widely supported and is almost always the language of choice for 3d applications such as computer games and 3d editors. All I am trying to do here is make C++ a friendly high level safe web language through the use of a library and a helpful interface. I want the C++ net script engine and the viewer it is being developed for to be free and open source and if possible free of any trade mark the same way C++ it self is free of any trade mark.



