Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Content

I've spent the past three weeks implementing the new GtsScript syntax, and the performance gains are pretty substantial over the old system! I'm finishing up the syntax, which is just a custom permutation of C#'s own syntax.

Here's an incomplete set of features so far:

  • Everything is case-insensitive - String comparisons, keywords, function names, etc.

  • Basic arithmetic, bitwise operations & comparisons (order of operations is currently broken)

  • Array accessing (Only one dimensional arrays are supported for now)

  • Switch statement (planned)

  • For statement

  • Foreach statement (Works on enumerable classes & arrays)

  • While statement

  • If else statement (with an unknown limit of else if's)

  • Object allocation statement (new Object() { var = value }, new Object(constructorArgs), arrays, etc.)

  • Local function + Global functions + Export functions

  • Function overloading

  • Extensions of classes (e.g. void GiantessAI::MyExtension() { echo("Hello World!"); })

  • Event functions

  • Including other script files (#include preprocessor directive)

  • Variable declarations

  • Lambda functions

  • Ternary operators

  • ScriptObjectReferences (!player, !ai, @"NamedObject" etc.)

  • $globalVariables

  • Yield keyword (Used as a stand-in for '[Halt]')

  • Return <value> keyword

  • Break & continue keywords

  • Nested variable declaration & assignment

    • Includes lefthand AND righthand increment / decrement operators (--/++)

    • Includes Implicit typename support (e.g. var myVariable = 100f; instead of float myVariable = 100f;)

  • Accessing & writing to static variables hidden within nested static / non-static types

  • Function pointers (e.g. var myFunction = echo; myFunction("Hello world");)

  • Value assignment to scriptrefs (such as !ai and !target)

Here's syntax that I don't believe will be useful for GtsScript (Feel free to express your support for them though):

  • Null forgiving operator (!ai.m_Stomach?.someVariable)

  • Null coalescing operator (!target ?? !player) (I'm on the fence about this one)

  • Custom data structures such as classes and structs

  • Generic parameters for function calls & declarations

  • Goto label statement (myLabel: ... goto myLabel;)

  • C++ #define macros (Would be cool, but would require a bit of an overhaul to the tokenizer)

Some major changes over the old syntax include:

  • This new scripting syntax will NOT be finnicky about whitespace / newlines - You can have all your code on one line if you really want to.

  • Block syntax (for, foreach, while & if) do not require curly brackets -- If you do not provide curly brackets, they'll just execute the next statement given. Also, you can just replace the curly brackets with a ';' if you don't want to run any code while looping.

  • Local variables are no longer prefixed with '%', and are instead just plain names.

  • The '->' and '::' symbols are being phased out (except for type extensions) - You can still use them if you wish, but it's encouraged that you use a period instead when accessing class variables, static stuff, etc.

Here's a text file with a lot of the syntax listed above if you're curious (Password is 'tJ7NRBdij4' without the apostrophes): https://pastebin.com/BXEPdjwc

If you have any opinions on the current syntax as it's lain out above, please tell me!

The reason I'm spending so much time on the new scripting language is because I believe the future of this project depends on extendibility! Nobody will play if there's nothing new to do or see, and I'm really hoping there's people out there with at least some Unity experience that want to tinker around with the project. That's really what this whole thing is dependent on, heh

Speaking of extendibility, I'm still finishing up the model importer! I still don't think Giantess support is in the cards for the next update unfortunately. Still though - player models & food models are a good start!

Thank you for your support, and I'll see you all next week!!! ❤️

Files

Previews only

Comments

Luna

Bro's actually about to develop a custom engine solely for vore at this point, and I'm all for it!

Zaya Wibri

Speaking purely as someone that knows JS (well can mostly read it and do basic things) this is very nice and readable,even if I am not familiar with this language. Fantastic job so far! I do have a question about the game however, it seems like controlling the giantess causes some issues, at least on my end, I press the key to control it and I can basically only move forward, and when I go back to player view, whenever I move the giantess AI will move as well. My question is, am I messing up the ai because of some system incompatibility or is this a bug that's (hopefully) fixable in the future?