TuplerScript [C# Released!]

Started by
1 comment, last by Merlinus 5 years, 11 months ago

TuplerScript is a free to use  library that allows for the easy creation of your own scripting language! You can customize the language to take in your own functions, and interpret text files at runtime. This system could be used for adding a modding system to your game!

 

The language is extremely simple, and only has 3 syntax rules:

  1. A "Tupler" is defined as a list of objects between square brackets, separated by commas.
  2. Comments are defined as statements between pound signs (#)
  3. Square brackets, commas, and pound signs after a back slash (\) will be ignored! (escape characters)

Using this simple system, you can make pretty much anything!

Example of printing "hello world":

https://gyazo.com/9aa218326e9a26e1980314e494d8cbc3

Example of adding two numbers, storing them in a variable, and then printing the result:

e2ba4a8d1b9ec12012922055eccb9130.png

This is not a language. This is a language framework which you can customize to suit your needs. Its easy to create your own dictionary of commands, designed for modders to interact with your own project.

If you are interested, you can view the full source for the C# version available on GitHub!

https://github.com/MerlinCoder/TuplerScript-CS-version-

Advertisement

I came up with an awesome idea to make it MUCH faster. I am now making a special executable for serializing the raw tuple data into pure binary after you write a code file. So, when your application wants to run the script, instead of interpreting the string data at runtime, it is much faster because the string is already converted into raw data that the interpreter understands! I'll release an example serializer soon...

One thing to note, is that I could add some sort of encryption system in this way, making it harder to reverse engineer tuplerscript

This topic is closed to new replies.

Advertisement