Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

I’m actually curious how you’re building your game for ECL. A Makefile might be overkill, but any tips on how ECL finds an entry point are welcome.

In my case, I have :ENTRY-POINT set for my system, but when I ASDF:MAKE, ECL seems to ignore it and the produced executable just launches into a REPL (vs. SBCL which runs my entry point and exits afterward). Of course, you don’t even have the entry point set in your .asd file, so now I’m curious…

Edit: this assumes you’re building an executable and not just distributing the game as source only.

(+1)

It's easier than you think! But remember that ECL generates C code, and passes that (and your user compiler flags) to your CC.

In particular to accomodate ECL, asdf has a specific function for doing-what-ecl-wants which is asdf:make-build . It works reliably as documented in the ECL manual's examples, and the asdf manual. It's also possible to build by directly using ECL's extensions (that asdf:make-build uses behind the scenes - basically compile-file has the &allow-other-keys :system-p t which spits out an .o object rather than a .fas fasl.). 

Consider this Makefile ("Makefile") :

https://gopher.floodgap.com/gopher/gw.lite?=tilde.institute+70+302f7e73637265777...

for this project (web proxies of source) :

https://gopher.floodgap.com/gopher/gw.lite?=tilde.institute+70+312f7e73637265777...

*It's also fairly simple to jiggle it into working with the Android NDK gcc. There's an example of that, and for apple iirc in the ECL source. I haven't used a phone in a decade though, so it might have changed.

(2 edits)

Thanks! After looking at your post and going through the ECL manual again, I now see the example you mentioned: https://ecl.common-lisp.dev/static/manual/System-building.html#Build-it-as-an-si...

I'm still surprised that specifying a system entry point doesn't work for ECL, but at least there appears to be a bug tracking that behavior (although it's unclear to me whether it's an issue with ECL, ASDF/UIOP, or actually just expected behavior that I don't understand): https://gitlab.com/embeddable-common-lisp/ecl/-/issues/686

You mean like how the ecl idiom seems to be to use :epilogue-code ? I remember being confused by that until I got used to it ! I think the manual example also uses :epilogue-code like that. It will be cool to see some deployed ECL games !