[Ecls-list] embedding ecl into a game engine
Ilya Kliot
plushe at gmail.com
Tue May 5 12:50:57 UTC 2009
Hi,
I started some 3d engine community http://code.google.com/p/m-nebula/
based on well polished, stable and robust scriptable 3d engine.
Currently it supports TCL, Lua and Python, I want to add LISP (already many
years I want, but only now got a little time for it). And I very motivated
after I
found this project
http://impromptu.moso.com.au/.<http://impromptu.moso.com.au/> I
understand well the power
of LISP and LISP dialects like Scheme and I think people will get a very
nice
environment with LISP powered by 3d engine that supports 3d, audio and
video.
The engine is also cross-platform - some small effort (mostly make
cleanup/order
in pakfiles and makefiles) needs to finish Mac & Linux ports.
I've decide to use ECL for this project because it seems to be most
suitable
small and portable and it's a Common LISP.
I've started well after i founjd sample of usage cl_boot, cl_shutdown and
si_safe_eval
in the mail list I also found the cl_def_c_function
and then I stuck, I can't get when I shiuld use make_simple_base_string and
when
c_string_to_object, what to do with errors and how to provide proxy to
exported
for script commands, in Tcl the commands of engine objects called by
replacing
"unknown" command of Tcl. In Python new python object type defined for same
purpose. I don't know how to make it currently for Ecl.
Actually I'll be glad to help to extend the documentation for 7.2 of
reference
and for externals.h and to provide a samples, but I need a help and
directions of how to start.
Here is an example that supposed to be near to final result:
extern cl_object eclcmd_New
nEclServer::nEclServer() : refFileServer(kernelServer, this)
{
//...
cl_boot(argc, argv);
//...
cl_def_c_function(cl_intern(1, make_simple_base_string("new")),
(void*)eclcmd_New, 2);
//...
}
//------------------------------------------------------------------------------
/**
eclcmd_New
(C) May-3-2009 + by plushy
*/
cl_object eclcmd_New(cl_object class_name, cl_object name)
{
if (ecl_stringp(class_name) && ecl_stringp(name))
{
nRoot* o =
nEclServer::kernelServer->NewNoFail(ecl_base_string_pointer_safe(class_name),
ecl_base_string_pointer_safe(name));
if (o)
{
return make_simple_base_string(o->GetFullName().c_str()); /// can I return
object in some way ?
}
else
{
//@# return cl_cerror() ? what should I return ?
}
}
//@# return cl_cerror() ? what should I return ?
return Cnil; //@# ? what should I return ?
}
Ilya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20090505/5fe96985/attachment.html>
More information about the ecl-devel
mailing list