Chinaunix首页 | 论坛 | 博客
  • 博客访问: 34456
  • 博文数量: 18
  • 博客积分: 485
  • 博客等级: 下士
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-28 11:55
文章分类
文章存档

2011年(18)

我的朋友

分类: Python/Ruby

2011-05-13 11:30:06

1. The Squirrel syntax is closer to C/C++/C# than Lua (IMO the Lua syntax provides no significant benefit) (IMO the C syntax provides no significant benefit either...). (depends on who has to write the scripts - engine authors or content authors)

2. Classes/instances are built into Squirrel (simulated with tables in Lua).

3. Squirrel has (fast) arrays. (So does Lua, since 5.0)

4. Squirrel was developed by an experienced commercial game developer for use in creating commercial games (after taking what worked well with Lua and changing/leaving out elements that did not). While the table and some string code are from Lua, the language is otherwise completely new.

5. Many developers prefer simple template binding: while LuaPlus is excellent for Lua, it does not provide easy solutions for class/instance support. While luabind is very powerful, with excellent support for classes/instances, it is also more complicated to set up/compile, can slow compile times, and can cause (extreme) symbol table bloat for debug builds. Such complex support is required for some applications, but may not be needed or desired for games. Squirrel has DxSquirrel (simple macro binding system), Squadd (boost-based, similar power/issues with luabind), and (provides everything I need for commercial game development, including simple/clean class/func/var/constant binding, calling script functions from C/C++, etc., and the template code is very lightweight).

6. Squirrel has a decent, syntax highlighted, portable remote debugger (uses the Eclipse environment). (both commercial and open-source debuggers are available for Lua, see plus, there's from Kepler)

7. I believe Alberto (Squirrel's author) commented that incremental GC won't solve the problems he encountered with Lua while developing scripting for FarCry. (Lua 5.1 has been released and also supports incremental GC now.) Also I prefer the Squirrel language/syntax over Lua's (I started using Lua at 4.x, circa y2k: I promoted Lua back then as an excellent scripting language for games (I used LucasArts as an example early adopter for commercial game applications)).

8. It's not possible to accidentally create a new variable using assignment : "clinet = 1" generates an error if "clinet" (mistyped "client") does not exist. "client <- 1" is required to create the new variable and assign it a value. (trivially achievable in stock Lua using "strict.lua" or the likes. i.e. a non-issue?) (It's an issue. "strict.lua" only applies to global or module scope. In other words your tables/arrays/classes are still error-prone)

9. w/Squirrel has VS.NET 2003 (VS8 compatible) projects and solutions: can be downloaded, unzipped, compiled and run in less than 5 minutes.

10. Lua has an established and growing set of 3rd party libraries. That's the biggest problem with Lua spin-offs : you trade in compatibility with everything written for Lua (see ) for some syntactic sugar and a feature or two that will be implemented in some future Lua version anyway... As of Jan 2008 that list of Lua libraries and bindings is fairly small. To talk of 'everything' written for Lua seems a bit of an exaggeration. Such libraries and bindings are worthwhile only if they are actively developed and maintained; how many have noteworthy industrial value?

阅读(722) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~