Post #4149535
2026-07-27 23:06 UTC
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
Replies (2)
-
@lda@masto.doskel.net 2026-07-27 23:08
Additionally, that also means I can just make fix_t fixed-point numbers and vec_ts a first-class citizen in said DSL, which would let me avoid annoying dances by doing things like FFN(4.0) or fmul, etc...
-
@nelson@wetdry.world 2026-07-27 23:07
@lda@masto.doskel.net can you show an example i'm very confused 😭