chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Question about embedding Chicken scheme


From: Julian Day
Subject: Re: [Chicken-users] Question about embedding Chicken scheme
Date: Sun, 20 Jan 2013 09:40:23 -0600
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

On 20/01/2013 3:38 AM, Christian Kellermann wrote:
This is an excellent question! Yes, you can use chicken as an
embedded scripting language for your game. The manual has a section
dedicated to that topic (embedding not games unfortunately):
http://api.call-cc.org/doc/foreign/embedding
Thanks - I've looked at that, and was glad to see that embedding was well-supported. It also looks like Visual Studio isn't a problem? I've looked at some other Schemes for embedding, and I've seen Windows (cygwin) at least once, which isn't an option. I'm using Visual Studio in Windows and g++ in FreeBSD for my development, so I want to ensure that both are supported without too much trouble.
See for an introduction into embedding. From a gut feeling I'd say
that providing callable accessors for your scheme script to modify
your game state is easier than passing around a lot of state all
the time since all this state would have to be transformed into a
scheme object and back to C/C++...

I was thinking so too, basically providing an API layer to Scheme to allow some common game- and state-related tasks (adding messages to the UI, loading items/NPCs on the map, and so on). If it's easy enough to expose C/C++ functions that can modify the game state, that's perfect.

So far people that use embedding have not spoken out loudly on this
list, but I am sure there are people using this feature. That would
be your clue guys! What are your experiences?

You will most probably have lots of questions, feel free to come
back and ask again. We value your feedback (and maybe that will
lead to better documentation in the first place).


Will do. I've still got some tasks on my to-do list before I look at getting Scheme support added, but it's coming up soon. My plan is to document my experiences as I go. Hopefully this will provide some help for anyone else thinking of using Scheme as an embedded game language.

Thanks,
Julian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]