Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

sakky

Creating scripting language & runtime

This topic is 5122 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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...

Share this post


Link to post
Share on other sites
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…

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!