Elektrine lite

← Feed

@lda@masto.doskel.net

Post #4149386

2026-07-27 23:00 UTC

trying to write a DSL for my danmaku engine (so that I can easily design and compose patterns) somehow, i'm always drawn to faux-Lisps as a design guide? i personally think it just kinda looks nice (also someone in BHA (I can't remember who) has their own Lisp-like DSL for their engine, so I guess I'm also stealing from them :p)

Replies (1)

  • @lda@masto.doskel.net 2026-07-27 23:06

    I feel like for C it gets annoying to compose complex patterns since you have to either copy/paste boilerplate or have to throw away some customisation... like for example, what if I want to make a bullet spread? I can just write some code that just spawns bullets with a direction that depends on an angle, that or put it in a function. If I want to make a "stack" of bullets, likewise, I can just make a function for that. Now what if I want a spread of stacks? You have two incompatible functions, so you end up just rewriting the logic for both What if then I want each bullet in the stack to be a more complex arrangement (like a "flower", made up of several bullets)? I feel like those kinds of issues could be easily solvable with a DSL specifically for pattern generation

    Open ##4149535