Log In  

Sharing this post I wrote up a few days ago for cleaning up my code and reducing token costs:

https://blog.giovanh.com/blog/2022/12/11/jinja2-as-a-pico-8-preprocessor/

In summary:

  • Constants would be a very useful language feature to have
  • Pico-8 doesn't have it and doesn't let you extend its preprocessor
  • You can roll your own and it works great
P#122376 2022-12-14 04:08

This is cool, thx for sharing!

It's like constexpr since you can do all kinds of stuff in jinja2 like loops and function calls.

I used to minify my stuff but ultimately removed it. Didn't like how it reduced readability so much on the bbs.

P#135231 2023-10-01 18:23

[Please log in to post a comment]