Menu

More modules

Lately I have been very busy working on converting the script language Yet Another Script (YAS) to become a module. The first part was not that difficult to achieve, though obviously I pulled more on my plate than first anticipated. Let me explain what I was working on.

YASC

The ANTLR parser version I am currently using is not suitable for the Windows RT/Phone operating systems. It contains calls to sockets for debugging purposes, which are not supported on those platforms. Therefore I decided to split up the parsing, error checking, etc. and compiling just like the content files: sources files and compiled CIL files.

I decided to implemented a separate compiler named YASC for the compilation of the script files. I could have re-used the content manager with some new features like module specific arguments. However by using an external application the script engine will have a looser integration, making it possible to use it separately or by other engines.

The compiler will compile the specified classes into the compiled intermediary language (CIL) language files. At runtime these files will be loaded by the new YAS plugin module. It loads the CIL class information from the files and convert them into byte code that can be run by the virtual machine.

Folder structure

Besides the script engine I also implemented the last two content modules: the world and tileset loaders. With these modules in place all current content can be compiled into c2d files that at runtime can be loaded by the content manager. The bigger plus is that it is now possible to work on a new folder hierarchy.

Currently all content of the games were in folders that are situated in the root folder of the engine. This has now finally been changed! The content will be stored in a game folder instead. For example the content and scripts of the demo application that comes with the engine are placed in the demo folder. This makes the folder hierarchy much simpler and it will now be possible to develop multiple games at the same time as each game has its own folder!

These and more changes will be released shortly as version 0.7. In the next release the complete workflow should be finished. It will then be possible build a complete game within the Crafter Workshop environment, including compiling content and script files.

Posted by Jeroen Broekhuizen 2014-02-13 Labels: modules script YAS Crafter content

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.