17 posts total
a toot by @bd[1] reminded me that for my uxn emulator I have this overengineered setup for dispatching code based on the opcode. It all starts with this macro which mimics the table from the uxntal opcode reference[2]... [1]: https://merveilles.town/@bd/110990685838534905 My 3D projection library for Uxn is complete! Features points, lines, variable FOV, adjustable view frustum, screen space clipping, and 16 bits of precision, everything in around 4 kilobytes of bytecode.
Show previous comments
i've been seeing this face in my dreams for the last 3 months . here's my recreation from memory
Show previous comments
@bellinitte Looks a bit like a pic of my father-in-law from the mid 70s. So, like, maybe? I can inspect this cube as close as I want with this sexy clipping ooh mama now we're talking This is aaalmost feature complete and i'll be releasing it as a library soon. What's left is some FOV stuff and code cleanup here and there I tried to keep the API as simple as possible -- you have a `set-camera`, `set-screen`, `project-point`, and `project-line` and that's basically it After hunting down many little bugs for the last two evenings, I finally have a working cube :D
Show previous comments
@bellinitte really easy to write some nice lil accessor macros too: %Player/position@ { .Player/position ADD LDZ2 } good progress today, implemented the entire scaffolding for rendering a basic cube. Next is the tricky part of implementing the actual math routines for fixed-points. @d6's fix16.tal is really gonna come in handy, and I'm also wondering how to approach the square root routine -- maybe Heron's algorithm? @bellinitte i saw that @neauoire had an implementation of heron's algorithm in uxntal (but for integers), so that is probably a good place to start. if it gives you trouble, let me know. i should probably add sqrt to fix16.tal sooner or later. @neauoire hey Devine, just out of curiosity -- how much do you utilize uxn's return stack (besides obviously for subroutines)? Did you, after all this time writing uxn, drift more towards "if I have a bunch of temporary things I'm just gonna stash them in rst", or "if I have a bunch of temporary things I'm just gonna store them in some locations in memory"? Or do you avoid having a bunch of temporary things altogether? @bellinitte I utilize the return mode a lot! It's especially useful to run two operations in parallel: https://git.sr.ht/~rabbits/left/tree/main/item/src/left.tal#L905 It's often to move two pointers at the same rate, one in the wst and one in the rst. Another very typical use that I have, is for drawing sprites. I'll often stash the x/y drawing position, do a routine, and then unstash them to restore the drawing position. I do these 2 things constantly. @bellinitte I've been collecting notes on varvara implementation, since you're going through process yourself at the moment, if you think of anything, I'd love to have your suggestions on documentation that are lacking :) I started making a personal varvara/uxn emulator. mainly for fun, but also I want to maybe modify it for my own needs in the future, and the implementation of uxnemu is waaay over my head right now, so i thought the best way to understand it is to make one from scratch. so far i'm going over uxn opcodes one by one. though i'd share something, so here are its first words |
@bellinitte Wow, those look nice! Do you happen to have a recipe for them?