diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-09 09:29:28 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-09 10:11:21 +0200 |
| commit | c62d8a1a22379a04e09623b60f8bd88a3e042040 (patch) | |
| tree | 2cfaaff0092b261f524616c507895963e95dabec /doc | |
| parent | 36213f7dfd59ab0f3e99b88e14b653723ca37d64 (diff) | |
Factor Out Controller Logic
Start factoring out controller logic, note that we need to manage
controllers at the app-level and not the scene level, as the
different scenes need gamepad events (for controlling cart selection
and passing to the game respectively).
There are some hacks to work around how the new abstraction does
not exactly fit the previous model, we will fix that up once we
wire up the rest of input handling: PICO-8 needs keyboard and mouse
events only from the host, and they need to be in SDL 1.3 format
(the Emscripten SDL builtin that PICO-8 uses).
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/journal.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/journal.md b/doc/journal.md index 6c9f1ff..7bfce6a 100644 --- a/doc/journal.md +++ b/doc/journal.md @@ -1,3 +1,14 @@ +# 02.10.2026 + +I figured out that PICO-8 is built with Emscripten using the [SDL 1.3 built-in](https://github.com/emscripten-core/emscripten/tree/main/system/include/SDL). We can use the headers to understand memory layout of the various pieces used by PICO-8. I noticed that: + +- AFAICT, it should only care about keyboard and mouse events (as joysticks are handled seprately with the "ASM constants" from JavaScript) +- It has very simple interactions, and most of the work will be stubbing the glue code related to Emscripten itself (like filesystem things) as well as the game controller and audio bridge + +# 22.09.2026 + +We can use `wasm2c` instead of embedding a WASM runtime: it is not only faster, but easier to build and glue together. + # 21.06.2026 Rebooting development of this project. Some things I've decided to change: |
