Live data from Hacker News

Embedding Scheme for a game mission scripting DSL

carloscarrasco.com

1–10 of 26 posts

Re: Embedding Scheme for a game mission scripting DSL

#2
Given the requirements I was rooting for Guile. He ended up choosing TinyScheme. Those who have not kept up with Guile development for the last 4 years would, I think, would be very pleasantly surprised, I was.

It has been vigorously developed upon, lots of changes to make it more performant and you can catch the highlights of all this action on Andy Wingo's blog http://wingolog.org/tags/guile

I like his rundown of different Scheme implementations http://wingolog.org/archives/2013/01/07/an-opinionated-guide... including the comments that readers left there.

Another neat scheme for games that I am aware of is ypsilon http://code.google.com/p/ypsilon/ one driving motivation for it was to keep GC pauses small, pretty important for games. I believe it has an incremental GC, not a fully concurrent one.

> The requirements included "Windows (compiled with MSCV) and iOS." Guile can do that?

Yep! with MinGW on Windows. IIRC they distribute such a prepackaged bundle. Will probably work with cygwin dlls too. Dont know about GUI inter-op, but Guile would build with Xcode

@xpolitix Good point about the need to link statically on iOS, had not thought about that one.

Re: Embedding Scheme for a game mission scripting DSL

#3
Embedded programming languages are really cool. Lua's still ruling the roost, as far as I've seen, but there are some nice options out there.

I'm currently using mruby for a project and have been quite happy with it so far. The community around it is still somewhat thin, but the code quality is good and development is quite active. https://github.com/mruby/mruby

Re: Embedding Scheme for a game mission scripting DSL

#4
post #2

Given the requirements I was rooting for Guile. He ended up choosing TinyScheme. Those who have not kept up with Guile development for the last 4 years would, I think, would be very pleasantly surprised, I was. It has been vigorously developed upon, lots of changes to make it more performant and you can catch the highlights of all this action on Andy Wingo's blog http://wingolog.org/tags/guile I like his rundown of d…

Guile looked to me firmly in the "midweight" category I mention in the article. I don't doubt it's a very good interpreter, in the same vein of Gambit or Chicken, but it required a combined size/platform commitment way above I was considering. Basically anything more complex than S7 is playing in a different league than little single-file interpreters like TinyScheme or femtolisp. If I had to start from scratch I would certainly consider a bigger, much more capable platform, but it's really late in the development of the game to add it.

I didn't know about ypsilon! The incremental/short pause GC looks very interesting indeed (although for the current usage in The Spatials I run TinyScheme as part of the map generation and then I completely unload it, so no GC, all the script logic gets encoded into command-like objets inside the C++ heap). But it appears it hasn't been developed for awhile. Still it's quite small, I will definitely look into in the future.

Re: Embedding Scheme for a game mission scripting DSL

#5
post #2

Given the requirements I was rooting for Guile. He ended up choosing TinyScheme. Those who have not kept up with Guile development for the last 4 years would, I think, would be very pleasantly surprised, I was. It has been vigorously developed upon, lots of changes to make it more performant and you can catch the highlights of all this action on Andy Wingo's blog http://wingolog.org/tags/guile I like his rundown of d…

The requirements included "Windows (compiled with MSCV) and iOS." Guile can do that?

Re: Embedding Scheme for a game mission scripting DSL

#6
post #4
post #2

Given the requirements I was rooting for Guile. He ended up choosing TinyScheme. Those who have not kept up with Guile development for the last 4 years would, I think, would be very pleasantly surprised, I was. It has been vigorously developed upon, lots of changes to make it more performant and you can catch the highlights of all this action on Andy Wingo's blog http://wingolog.org/tags/guile I like his rundown of d…

Guile looked to me firmly in the "midweight" category I mention in the article. I don't doubt it's a very good interpreter, in the same vein of Gambit or Chicken, but it required a combined size/platform commitment way above I was considering. Basically anything more complex than S7 is playing in a different league than little single-file interpreters like TinyScheme or femtolisp. If I had to start from scratch I wou…

Have you looked at Chibi-Scheme? http://synthcode.com/scheme/chibi/

Re: Embedding Scheme for a game mission scripting DSL

#7
post #2

Given the requirements I was rooting for Guile. He ended up choosing TinyScheme. Those who have not kept up with Guile development for the last 4 years would, I think, would be very pleasantly surprised, I was. It has been vigorously developed upon, lots of changes to make it more performant and you can catch the highlights of all this action on Andy Wingo's blog http://wingolog.org/tags/guile I like his rundown of d…

Guile LGPL makes it incompatible with commercial games on iOS (because exes are required to be statically linked). However, I think it's one of the best choices on other "more permissive" platforms.

Re: Embedding Scheme for a game mission scripting DSL

#8
post #6
post #4

Earlier quoted context omitted.

Guile looked to me firmly in the "midweight" category I mention in the article. I don't doubt it's a very good interpreter, in the same vein of Gambit or Chicken, but it required a combined size/platform commitment way above I was considering. Basically anything more complex than S7 is playing in a different league than little single-file interpreters like TinyScheme or femtolisp. If I had to start from scratch I wou…

Have you looked at Chibi-Scheme? http://synthcode.com/scheme/chibi/

Yep, and discarded it early. From the home page:

Windows (under Cygwin)

This is usually code for "needs UNIX/POSIX APIs", or its uglier cousin, "uses C99". I wouldn't mind Mingw32, and would mind a little bit Cygwin, but the problem is that for a video game I can't even begin to consider those platforms for Windows. All the official platform SDKs, or the third party ones (think Steam) require the Microsoft compilers and libs.

Re: Embedding Scheme for a game mission scripting DSL

#9
post #7
post #2

Given the requirements I was rooting for Guile. He ended up choosing TinyScheme. Those who have not kept up with Guile development for the last 4 years would, I think, would be very pleasantly surprised, I was. It has been vigorously developed upon, lots of changes to make it more performant and you can catch the highlights of all this action on Andy Wingo's blog http://wingolog.org/tags/guile I like his rundown of d…

Guile LGPL makes it incompatible with commercial games on iOS (because exes are required to be statically linked). However, I think it's one of the best choices on other "more permissive" platforms.

The LGPL doesn't prohibit static linking. You are free to use static linking with the LGPL as long as you make the (potentially modified) LGPL source code and any other components of the linking process available. See section 4 d) 0) of the LGPL:

http://www.gnu.org/licenses/lgpl.html

In particular, iOS WebKit has been distributed in this fashion. You can download a source tarball from Apple that includes static binaries alongside the LGPL portions of the source.

The reasons for not wanting the LGPL probably have more to do with the LGPL placing obligations on Apple to convey source code to users upon request.

Post reply on HN