Jump to content
  • Advertisement
Sign in to follow this  
Zotoaster

What do you guys think of this?

This topic is 4160 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

This is my latest implementation of my scipting language JemScript. I designed it to work with DarkBasic Professional, as the lack of scripting really got annoying, and all other scripting packs cost money. I've tested the two, and this one runs about 3 times faster than DBPro! One disadvantage is is runs completely asynchruously from DBPro, and the VM executes it all at once, so recieving return data from functions is not possible. This is a simple program:
//Display text
function display(var txt)
{
    print txt; endl;
}

//Addition function (just for the hell of it :P)
function add(var a, var b)
{
    return a+b;
}


//Main function (doesn't necesarly have to run first, but it's the one that's being called)
function main()
{
    display( "3 + 4 = " + string(add(3,4)) );
}
As you can see, its modular, has scoping, it weakly typed, have simple typecasting (only int, float and string), and also supports: if/else and do/break. I also intend to make simple tables. They will have nothing to to with the VM, they will just be compiled differently. They might look a little something like this:
player = [

    var name = "Zotoaster";
    var age = 10000000;

    details = [

        var height = 5.5;
        var weight = -2.2;

    ]

]
And just to let you know, it doesn't support arrays :/ So, what do you think of it so far? Is there anywhere I could improve on? Maybe any features I should/could add? Please leave comments and critiques :] Cheers

Share this post


Link to post
Share on other sites
Advertisement
Seems ok, without a demo or anything more concrete you'll not get much more feedback ;)

Few things though:

You mention it is modular, but I see no constructs for modular programming.

Performance compared to other languages is irrelevant unless you're providing the exact same facilities.

Why have a 'var' keyword when the language is dynamically typed? Surely you don't need it for syntactic ambiguity (since there isn't any in the snippets you've provided)? Hell, why have it even if the language is statically typed :)

Similar for the function keyword, it seems redundant in the snippets.

What truly is the purpose of this language? It just seems like a more limited version of Lua or something with nothing really to distinguish it. I'd like to see some more game specific ideas e.g. comprehensive string handling, built-in state machines, complex built-in data structures and data structuring facilities (tuples, records, atoms/symbols).

You haven't mentioned the execution model, other than it being 'asynchronous' with DarkBasic - what do you mean by this? how do you control data or call functions in DarkBasic? How do you write these bindings? Can I create coroutines? True asynchronous processes? How about latent functions? (i.e. functions in DarkBasic that halt execution of a JemScript until complete)?

Good work though, creating languages isn't easy :)


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!