Creating scripting language & runtime

Started by
2 comments, last by sakky 19 years, 10 months ago
Okay, I want to build a scripting engine, and I will! The scripts are ran much like a vertex program or vertex shader are. The main function will be variable parameter(s), but will always return the same data type. The language is something similar to BASIC and ASM or looks more like Pascal or Fortran. I want to know how I can build a runtime that will load these scripts like a DLL or shader is loaded. I want the script to be in binary format, or maybe byte code or something similar. I need to know the architecture for shaders and stuff like that are ran. So I can make my own runtime to load my own type of programs; so to speak. It’s almost like an interpreter but the information if already compiled to machine level commands. So it would be more like the load-and-go with out the translation. I hope I got the explanation right
Take back the internet with the most awsome browser around, FireFox
Advertisement
you basically develop your own assembly languaje, consisting in a set of bytecodes, each one handling a specific and simple operation.

then you program a module that reads and executes the list of bytecodes. That module is usually called "virtual machine"

and when you have done all of this, you can develop your own script languaje, and a compiler, that converts the script into bytecodes.

this is much more easy to say than to do... I suggest you to go to script languajes forum, or look in the gamedev tutorials about how to create scripting languajes and virtual machines.
I created a script langage for a PSOne/ Dreamcast / PC game.
I started with a tutorial on flipcode, then I get a grammar / lex file for the C langage, and I created mine with all of this.

Wasn''t as hard as it may seem.
Perhaps there are better tools now than lex / yacc...
You should just be cautios about what you really want your langage to do...
Basically, I want the language to be like Java. I want the virtual machine to be broke down into an easy-to-use API, that I will have to create. I also want the virtual machine to allow extension. Meaning, I want to be able to extend the virtual machine if I need to. So all I really need is just the core reading or executing part of the virtual machine.

That virtual machine is what I need to know how to make. As I said before, the main function for these scripts have variable argument list. So each script may be tailored for a certain purpose or task for a certain data structure or algorithm.

Thanks for you input though…
Take back the internet with the most awsome browser around, FireFox

This topic is closed to new replies.

Advertisement