Advertisement

Heavy scripting

Started by July 25, 2004 05:09 PM
17 comments, last by Etnu 20 years, 4 months ago
Quote: Original post by Raduprv
LUA is teh evil!
J/K
Anyway, you might want to use Small, has all your requirements, and it's easier to embed than LUA.
I don't mind difficulty, nor do I mind having to precompile the script, but I do mind that it says that scripts run "uncontroled" once amx_Exec()ed... and the doc is ridiculously huge, so I didn't go on.
Well, then I guess you would prefere some scripting language with 3 lines of docs, or no docs at all. Personally, I like big docs, explaining everything.
The uncontrolled mode is a small problem, but you can always use the debugging hooks, which return at the end of avery instruction, so you can implement exit mechanisms.

@JohnBSmall It is VERY easy to embed. The docs alone are very descriptive. As for the not being able to run source code, you can always include the compiler and compile your code, but it's SLOW (takes a while to compile big scripts).
Advertisement
Quote: by interruptable, i mean that when the scripts calls a function that takes an action within the game world, that function can (for instance) set a flag that makes the interpreter stop there, for now (will resume when the interpreter is called again)
It sounds like what you want are continuations, which are not common among scripting languages. The only one I can think of is Scheme.
---New infokeeps brain running;must gas up!
lua's threads effectively does this, but I'll look at scheme anyway (why not!) :)
If you're checking out scheme, you might want to look into Guile. It is a scheme interpreter designed to be used as a scripting language. I've no idea how easy it is to use or what features it supports because I haven't used it (it was in my list of things people suggested I look into when I was working on my own Lisp interpreter).
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
You could use C# as a scripting language.

---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

Advertisement
Quote: Original post by Etnu
You could use C# as a scripting language.

But if you were going to do that, why wouldn't you write the whole game in C#?

Anyway, C# is perhaps a bit too heavy-weight given C-Junkie's requirements.

John B
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
I'd like to recommend Squirrel. It's a lot like Lua but with a more C-like syntax ({} instead of begin/end) which I prefer. It too has "interruptable" threads but I think 1000 might be too slow in either language - although it depends how often they get the CPU.

http://squirrel.sourceforge.net/
Quote: Original post by JohnBSmall
Quote: Original post by Etnu
You could use C# as a scripting language.

But if you were going to do that, why wouldn't you write the whole game in C#?

Anyway, C# is perhaps a bit too heavy-weight given C-Junkie's requirements.

John B


Performance, mainly.

---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.

This topic is closed to new replies.

Advertisement