Skip to main content
GameDev.net gamedev.net
🔒 Locked

Squirrel, why is it not getting traction???

Started by dxben Mar 5, 2005 at 4:59 PM 16 replies 12.5k views
Original Post
dxben
dxben
This is a bit of a rant. I happen to love Squirrel, I happen to find it more natural than Lua, as I'm a C++ programmer and I also prefer its deterministic GC (by way of reference counting). But without getting into a Lua vs. Squirrel, I just want to say I am getting frustrated with the lack of community involvement with Squirrel. I think its good enough to be getting much more use. A few weeks ago a guy from Poland released a template library called Squadd (Squirrel with Additions), which is basically similar to a ToLua or LuaPlus utlitity that automatically generates bindings for all C++ methods, properties, and global functions. I guess I would like to see more people try out Squirrel and if possible give Squadd a try and help propell it to a stable state. The author won't be able to do it alone and I can't be the only public beta tester. I think with Squadd, Squirrel is very close to being an easy dropin language that rivals Lua for speed and memory efficiency, and is much more famliar to C++ syntax lovers. I hope folks reading this will check it out and give it a shot. We can't all live off Lua (all respect to it :) ) Below are the links to Squirrel's main page and forum, and to the Squadd library on sourceforge. We are discussing Squadd on the Squirrel forum under the embedding area. I hope to see you there. UPDATE: The Squadd author is working on a new version so I suggest waiting until he releases it before testing Squadd in its current state. But Squirrel 2.0 RC1 is in perfect shape for real usage. Give it a go! Main Squirrel page: http://squirrel.sourceforge.net/ Squadd template library for Squirrel: http://squadd.sourceforge.net/ General Squirrel Forum area: http://squirrel.sourceforge.net/forum/ Squirrel Embedding forum area: http://squirrel.sourceforge.net/forum/viewforum.php?f=3&sid=7a1c23b52b8bcf7664def7d63fb4e824 [Edited by - dxben on March 5, 2005 5:24:41 PM]
Kylotan
Kylotan
Well, I think you're expecting a little too much. There's no immediately obvious reason why people would choose Squirrel over Lua, but there are several reason to choose Lua over Squirrel: numerous binding libraries, proven experience in existing games, high quality documentation and downloadable book (although Squirrel's docs are good), slightly better performance (according to Fagiano posting here a few months back), etc. I also think there isn't much publicity for Squirrel (because nobody is using it; vicious circle) and I certainly hadn't heard of Squadd until you mentioned it.

However, I do intend to take a look at Squirrel because it certainly looks like a good language. And it would be good if anyone who's made anything with Squirrel could post examples of what it can do. (Although obviously almost all languages are equivalent, finished projects hint at how easy the language is to use.)
silvermace
silvermace
quite frankly, i agree. i dislike Lua's syntax, LuaPlus is obfuscated, and squirel pwnez Lua's jedi-mind-tricks.

FYI, i will be integrating Sqr into my engine, i have always thought an engine should be "scripted" in a language which symantics more closly resemble the internals, you can argue this till kingdom come, but as an indie developer i will have to transition between script code and engine code, its so much less frustrating when syntax are similar..

/plans on helping out with development.
Oluseyi
Oluseyi
The other factor you're overlooking is that Squirrel appears to be a replacement/competitor to Lua, which is of little to no interest to people who don't care for Lua in the first place (eg, me).

Not all of us want to script C++. Some of us would rather extend the dynamic language with C++.
dxben
dxben
I think Kylotan makes some fair points. I am not expecting Squirrel to take the world by storm, but by comparison AngelScript has far more publicity and I don't feel its any better.

I will see if I can throw up some of the things I've done with Squirrel. I have written my entire Baseball AI engine using Squirrel and I have found it able to do some very cool things. Its possible the same things are doable in Lua, I don't know.

But I know that the Squadd author is working on a new (better) release and I hope folks give Squirrel a go.

Thanks for hearing me out :)

Silvermace, I hope to see you around the Squirrel forums or hear of your work with it.
Josh Yelon
Josh Yelon
Another unfortunate reason...

I notice that squirrel doesn't seem to come with a "standard library." For example, it doesn't appear to have a function to open a socket built-in. Now certainly, I can write a wrapper around the C function "socket" and do an "sq_newclosure" to enable squirrel to open a socket. But that's harder than just having a scripting language with that function built-in.

That's why common lisp never caught on. It's a great language, but there's still no OS-independent way to open a socket in lisp. Or create a window. Or open a web-browser.

Truly, that's the real reason I didn't write my own programming language years ago. I could easily write the compiler and interpreter (my own language would have both), but the standard library... that could take forever.

(Oh, for all I know, the same could be true of Lua. But if so, then I wouldn't use Lua either).
- Josh Yelon-- Distribution Maintainer, Panda3D Engine
dxben
dxben
I don't know if Lua has it or not but I believe this class of languages (lua, squirrel) are not meant to provide those facilities. They are more meant to augment game development and game engines. Typically you are not opening sockets from scripts in games.

So I don't see that as a fair point. What usually decides things in this area of games is language ease of use, and the ease of use of which a language can be bound to the engine. I think Lua may have appealed early on because in its early form it was natural to use for configuring games. But what gets me is that it had suffered for a long time with garbage collection issues that effected framerates. I recall when I was working at Microsoft talking to one of the dev leads on the XBox Amped snowboarding game. He said that they had used Lua for that game but were severely struck by the dreaded GC pause in the middle of animations. They had to go back through the code and tripple check that no allocations were taking place during the in game portions and be incredibly careful.

I think that alone should have slowed Lua's growth but it was able to move past that, often within games (Monkey Island 4 I think is a good example) where there's a lot of config oriented stuff and the action is not as fast paced. The GC is less of an issue.

Squirrel has a RC collection with an optional mark and sweep that requires being called by the developer, but which rarely is needed. I prefer the deterministic behavior of RC over the better "theoretical" and more efficient performance of mark and sweep.

Right now I am playing with LuaRC, which is a modified version that uses reference counting. I am trying it out with luabind, which I believe the Squadd author based his library on. I figure Squirrel and Lua are similar enough that it would only help to understand Lua better.

Sorry for the long post..
Hardguy
Hardguy
Just pointing out the my project unbirth (www.unbirthgame.com) uses an engine that has a modified version of squirell for all game code. Over 40 000 lines of squirell for unbirth that is :). I like the language, and it can do some really useful stuff.
dxben
dxben
Wow, very cool!

Are you able to say what in particular you modified in Squirrel? And why? I am just curious so I can get a better understanding.

Also, did you use version 1 or version 2 of Squirrel (the latter of which supports classes)?

Also you said you had 40,000 lines of Squirrel for unbirth. That is a lot. Did you do a lot of binding between your engine and Squirrel and if so did you find a way to automate it or is it all by hand? Or maybe there is minimal interaction between the two?

I love the look of Unbirth, its a cross between Silent Hill, The Longest Journey and Sanitarium! All great games!
Hardguy
Hardguy
- Are you able to say what in particular you modified in Squirrel? And why? I am just curious so I can get a better understanding.

Well, it not I that have modified squirell. I am just using it to code for the engine. But things that are modfied is that that you can write stuff like:
int x=0;... if(x){..}
So it is easier to use functions form the sdk.
Some stuff in the delegate is changed aswell, to support OO programming better.
Can't remember all the changes and I am too lazy to check the changelogg at the moment.

-Also, did you use version 1 or version 2 of Squirrel (the latter of which supports classes)?

v 1, never tried out the class support.

-Also you said you had 40,000 lines of Squirrel for unbirth. That is a lot. Did you do a lot of binding between your engine and Squirrel and if so did you find a way to automate it or is it all by hand? Or maybe there is minimal interaction between the two?

As I said I didn't code anything of the engine, but I know that is using diffrent tools to bind all funcs to squirell. A custom Visual Studio tool is used convert a header into code that binds the methods into squirell. I don't really know how that tool works though.


Hope that answers some questions :)
Hardguy
Hardguy
Heheh... So you lurk here aswell Pierre :P
Josh Klint
Josh Klint
Squirrel is probably designed more for integration with a C++ application, which is a big advantage over Lua, which definitely was not. When you use Lua, you are usually relying on another third party binding library, which all seem to be abandoned, and may or may not work. We attempted to use LuaBind, and found severe problems with basic functionality no one knew the answer to.

Don't listen to the people who say it should have x command built-in. I don't see why a scripting language should have any built-in commands. That's idiotic.

However, Lua has the excellent LuaJIT, which compiles Lua files into actual machine code. This makes compiled Lua execution something like 200 times faster than interpreted Lua, in some benchmarks. Therefore, Squirrel is a scripting language competing against a compiled language, the speed of which it will never match, unless they wrote their own JIT compiler from the start.
dmail
dmail

When you use Lua, you are usually relying on another third party binding library, which all seem to be abandoned, and may or may not work. We attempted to use LuaBind, and found severe problems with basic functionality no one knew the answer to.

Your problem was with LuaBind please can you stop this FUD. It seems to me that you opened this six year old thread to vent off some of your anger, I do hope your Teddy is OK


Warvstar
Warvstar

Squirrel is probably designed more for integration with a C++ application, which is a big advantage over Lua, which definitely was not. When you use Lua, you are usually relying on another third party binding library, which all seem to be abandoned, and may or may not work. We attempted to use LuaBind, and found severe problems with basic functionality no one knew the answer to.

Don't listen to the people who say it should have x command built-in. I don't see why a scripting language should have any built-in commands. That's idiotic.

However, Lua has the excellent LuaJIT, which compiles Lua files into actual machine code. This makes compiled Lua execution something like 200 times faster than interpreted Lua, in some benchmarks. Therefore, Squirrel is a scripting language competing against a compiled language, the speed of which it will never match, unless they wrote their own JIT compiler from the start.


http://wiki.squirrel-lang.org/default.aspx/SquirrelWiki/Squirrel_JIT.html


There are some commercial games that use Squirrel as there scripting interface, http://en.wikipedia.org/wiki/Squirrel_(programming_language)

Personally, I have Lua script in my engine right now, but I'm going to try out Squirrel.
Josh Klint
Josh Klint
Your problem was with LuaBind please can you stop this FUD. It seems to me that you opened this six year old thread to vent off some of your anger, I do hope your Teddy is OK

I came across this thread while doing research on the Squirrel programming language, and I described the main reason I decided against it.
_the_phantom_
_the_phantom_
It should be noted that the thread had been dead for 6 years before you brought it back; please don't do that in future and pay attention to the last post date.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.