🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Choosing a Scripting Language

Started by
37 comments, last by irbrian 20 years, 2 months ago
If you are looking for a luscious turing tarpit of programmability you can try out my script language project, be warned it is still in heavy development though.

It has ''C'' syntax, Scheme Syntax, Basic Syntax, Python Syntax without whitespace, Perl syntax..

http://xano.sourceforge.net

The best part is it is quite a bit faster than most other script languages because of how simple the VM is designed.

And you are free to take what I have started and hack it however you see fit :-)

See yah
Advertisement
If you wanted Python syntax, you could just add some sort of white space counter in the scanner. And you would have to change things here and there. It would only be a day or two of work to change it to parse python code. C and Scheme were on the fore-front of my design but I use the word ''basic'' mostly so it doesn''t scare newbies away too much :-) It really is not that much harder than Basic.

I have plans eventually to either translate code to C++ and compile them into DLLs or use SoftWire as a JIT. This requires a change in the parser to parse to Parse Tree structures, it could be possible to unwind the assembler code stack and reconstruct native code too but a parse tree would be much simpler to translate.

Good luck
Who is going to be writing your scripts? Where I work most of the scripts are written by non-programmers. A C-like interface is a negative.
A Dylan-like interface might be more acceptable among non-system programmers. I believe AppleScript is based on Dylan and is supposed to be quite nice.

Dylan is like Scheme without all the parentheses -so there''s no excuse not to like it!
That is another alternative.. tiny scheme! It is very good.
You can also find mini-scheme around somewhere.. and some small lisp interpreters.

Scheme is quite nice, clean, simple, to the point.

There is also guile, gauche, scheme48, scsh...

I think mostly what he is looking for is an algebraic syntax similar to C minus the things that make C C :-) A script language with pointers is probably a bad idea.

quote: Original post by PeterTarkus
If you are looking for a luscious turing tarpit of programmability you can try out my script language project, be warned it is still in heavy development though.

It has ''C'' syntax, Scheme Syntax, Basic Syntax, Python Syntax without whitespace, Perl syntax..

http://xano.sourceforge.net

The best part is it is quite a bit faster than most other script languages because of how simple the VM is designed.

And you are free to take what I have started and hack it however you see fit :-)

See yah
Where can I find more syntax examples?
---------------------------Brian Lacy"I create. Therefore I am."
Oh gad, in the source code :-)

I am heavily working on it, I meant more if you want to take it and hack your own language from it. I would be glad to help you out with any questions you have about how it works.

Tiny-Scheme is pure Scheme, tons of books on the net. It''s really a very simple language. If you give it a day or so of real effort you can pretty much master the general idea of the language.
I think Scheme would be seriously a cool game script language.

I would suggest you look at something else right now, maybe in a few months my project will have matured enough but it''s really more for daring people than as the choice for a serious project.


quote: Original post by flangazor
A Dylan-like interface might be more acceptable among non-system programmers. I believe AppleScript is based on Dylan and is supposed to be quite nice.

Dylan is like Scheme without all the parentheses -so there''s no excuse not to like it!
You know, as far as NON C-like languages, I do kind of like the syntax style of AppleScript. Of course AppleScript is for manipulating MacOS and its Apps. I still haven''t found any examples of Dylan syntax though.

Peter, I liked the very short examples I saw of your planned syntax. That''s why I initially asked for more examples of source code. But I''ve decided that I just don''t have time to code my own scripting language nor to monkey with someone else''s. Do keep me posted on the progress of Cull though.

****************************************

Brian Lacy
ForeverDream Studios

Comments? Questions? Curious?


"I create. Therefore I am."
---------------------------Brian Lacy"I create. Therefore I am."
quote: Original post by Anonymous Poster
Who is going to be writing your scripts? Where I work most of the scripts are written by non-programmers. A C-like interface is a negative.
For the most part, the scripters will be semi-experienced web programmers (PHP, JavaScript scripters) and inexperienced game programmers (C/C++ coders).
---------------------------Brian Lacy"I create. Therefore I am."
No problem, I understand, Check back up on it a couple of months and I think you''ll find it more stabilized. I am still heavily working on it. I have plans eventually to divorce the parser and scanner from the language, to build a better lexer using regular expressions, so that it is easy to custom the language to a syntax you want. I wish Lex and Yacc worked on MSVC, MKS costs way too much money for me.

I dunno about Dylan, but I am sure fond of Scheme :-) There is only 1 Dylan implementation I know of for the GNU compiler suite.

Lua is not bad at all, it is just a nightmare to integrate with C++. That is a primary reason I am writing this script language particularly for game programmers needs as I feel the majority of current script languages are not well suited for game programming.

A game script engine needs to be fast, it can not be constantly allocating memory all the time, and it just doesn''t need all the batteries those languages are included with. For security purposes it''s bad to have those batteries really unless the language is being used server side for an MMORPG or something.
It depends on how it is used.

The only other thing I can suggest is that Cypher engine comes with a byte-code interpreter which has an LCC backend for it. That is a true C compiler. You might be interested in it.

This topic is closed to new replies.

Advertisement