Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I have some questions regarding  Hoot (or the game template):

- Is it possible to reduce the compile times?, maybe compiling into separate wasm modules  and combining them somehow using tools external to Hoot?

- Emacs geiser does not work with hoot right?, I tried  evaluating hoot related modules, even with the load path indicating Hoot's source code does not seem to work. I wonder how can I use the guile repl and hoot, it would improve development time considerably.  Maybe it can be done by organizing the code in a different way and keep some guile modules without Hoot dependencies?.

- Guile specific question. Is it possible to filter the error messages, sometimes the full backtrace is not that useful, only the file and line number indicating the error. Ideally Emacs next-error  would work with Guile or Hoot's error reporting. Here is an example error message.

 -    hoot/library-group.scm:1231:27: unbound top-level #("engine/map.scm" 151 11)  some-undefined-variable

Ideally some hoot compiler option could present the error like this:

- engine/map.scm:151:11

  • Hoot is a whole-program compiler so compilation times are longer than in separate compilation because there's simply a lot more code to deal with. However, it's possible to compile multiple separate modules and have them work together. One module would serve as the primary module that exports its ABI and the other modules would be secondary modules that import their ABI. I recently did this for a program by splitting up the backend (which was a lot of code that rarely changed) and the frontend (which was much smaller and quicker to compile). The --mode=secondary flag for guild compile-wasm is what you should look into. In JS, you'd call load_main for the main module and then load_extension for each secondary module. See here for an example.
  • Correct, Geiser is not supported right now so there isn't really a usable workflow for live hacking.. We have plans for a geiser-hoot.el package but we haven't gotten to it yet. Since the REPL would be running inside a web browser tab, it cannot act as a REPL server like we need it to. Resolving this will require introducing a WebSocket daemon middleman, much like Fennel's webrepl.  I hope this is something I can work on soon.
  • Yes, I would like to catch that unbound top-level error and print a better message rather than just a raw backtrace. That error is generated from an early phase in the compiler defined in the (hoot library-group) module. I filed an issue to track it.
(+1)

Thanks!, I will try the suggested approach for compiling modules.