Instance Logo

social.noyu.me

hikari 🌟 (sparkly arc?) . @hikari,

there are a number of important limitations, but it's already usable enough to write small games and demos. with some effort, it's even possible to port some existing software! i've managed to get a certain classic app working in it. i'm hoping to announce it soon :3

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

the fact it's a stack machine makes it really fun to write (or generate!) assembly for. you never have to remember register numbers, all the inputs and outputs are implicit. the magic of concatenative programming~

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

one of the challenges was that uxn doesn't have signed integer operations, but they're essential for c code, so i had to write some little helper routines that emulate signed operations. for example, this does sign extension (char->int conversion):

#80 ANDk EQU #ff MUL SWP
Open thread
hikari 🌟 (sparkly arc?) . @hikari,

btw, uxn/varvara is a really impressive vm. what amazes me is how small it manages to keep its api surface while still providing everything you could want: graphics, sound, mouse input, keyboard input, gamepad input, file i/o, a real-time clock, stdin, stdout and stderr!

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

it does all of that while having far fewer api entrypoints than posix or wasi or the browser or any api you can think of, and they're all defined in such simple and constrained ways that there's very little room for incorrect implementations (though still some: i have found bugs)

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

so i think uxn apps will have fantastic portability. better even than famicom roms, and yet they can do more!

it'll never replace wasm: apps can only use 16-bit integers, a 64KiB address space and 2-bit color. but that's still a whole universe of creative potential. i love it.

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

i am pleased to announce oneko-uxn: a port of oneko-sakura to #uxn. this is a version of the classic software ”Neko”! 🐈🖱

https://github.com/hikari-no-yume/oneko-uxn

日本語版も有ります。

this all was made possible with chibicc-uxn, the c compiler for uxn that @lynn and i have worked on together.

have fun!

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

i painstakingly preserved the structure, comments, and feature set to the greatest extent possible… parts of this codebase are several years older than i am, and i wanted to respect the history. it's the most faithful port of this program that is possible, i think!

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

this has to be a known algorithm, right? it's so much easier to compute on a system with only integer arithmetic, and gets amazingly close to the right answer…

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

@lynn @neauoire (cc)

this will probably be the final version, fwiw. i wasn't intending to have more than one version, but i wanted to fix that movement vector bug, and that made it clear the premise i had for not allowing window size customisation was wrong, so i added that too

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

oops, i forgot to recompile when i bumped the version number. i fixed that now, but this means someone out there might have a copy of the rom that reports a lower version number, but has the new features and fixes 👻

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

@cr1901 @lynn

0 ≤ x ≤ 2π

cx = cos(x)
sx = sin(x)

i plot a point at (cx, sx)

interpreting (cx, sx) as a vector from (0, 0), the euclidean distance is always going to be 1, right

i then calculate the same distance with our approximation, and plot a point at (cx * distance, sx * distance)

so the red line shows how far it strays from euclidean distance at various angles

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

@cr1901 @lynn you can see that at 0°, 90°, 180° and 270°, there's no difference, which should be intuitive considering that these are exactly the directions for which euclidean distance, L1/manhattan distance and L∞/chebyshev distance are identical, so an average of these last two should be the same as the first of these

Open thread
R. L. Dane :debian: :openbsd: . @RL_Dane, @fosstodon.org

@hikari

That is so lovely! Incant wait to download it when I get home.

I remember playing with a version of Neko on my Mac SE circa 1990. Neko stayed on the desktop and followed the mouse everywhere.
Actually, I believe it came on Bob Levitus' book (and floppy), "Stupid Mac Tricks." It flickered a lot, bit was cute. 😁

Open thread
R. L. Dane :debian: :openbsd: . @RL_Dane, @fosstodon.org

@hikari

Ah, I missed that one. That would've been neat.

A lot more wholesome than that bizarre app where you give a monkey crack cocaine and he does unspeakable things to a bunny.

Some of those PalmOS apps were deranged, lol

Open thread
hikari 🌟 (sparkly arc?) . @hikari,

@neauoire @lynn wow, that's some coincidence! but to be honest i was slightly surprised when i couldn't find an existing port to uxn. it felt obvious, hehe. I'm glad you like it!

my first exposure to Neko was playing a PalmOS port of it as a kid, around two decades ago, so i've had a lifelong fondness for it at this point.

Open thread
lhp . @lhp, @mastodon.social

@hikari @lynn Coincidentally I also recently used the old neko bitmaps for a personal project! If anyone wants code snippets for displaying them on Wayland using pixman, let me know. It is straight-forward, but pixman enforces a minimum stride and a minimum buffer size, which means you can't use the original sizes of the bitmap sprites. I ended up stitching them together into a texture atlas.

Open thread