[Ecls-list] embedding ecl into a game engine

John Connors johnc at yagc.ndo.co.uk
Wed May 6 14:34:28 UTC 2009


I did something like this as proof-of-concept for the G3D engine some 
time ago. My experiments are here: http://repo.or.cz/w/Procustean.git. I 
ran into a lot of the problems you have, I hope you find the source 
educational.

Ilya Kliot wrote:
> 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 
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
> production scanning environment may not be a perfect world - but thanks to
> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
> Series Scanner you'll get full speed at 300 dpi even with all image 
> processing features enabled. http://p.sf.net/sfu/kodak-com
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>   





More information about the ecl-devel mailing list