Movycat – A terminal movie player written in Zig

github.com

58 points by codethief 3 days ago

I saw Mario (the author) at Zigtoberfest in Munich last Saturday where he gave a presentation on a whole stack of related projects implemented in Zig: A graphics library for the terminal (movy), movycat (video playback in the terminal), zig64 & zigreSID (emulators for Commodore 64's CPU and sound chip), and a reimplementation of a C64 video game (which I don't think he has published on GitHub yet). Anyway, I found his work incredible and thought he deserved some attention.

Update: Since writing this, Mario has uploaded the game, too: https://github.com/M64GitHub/1st-shot . I misunderstood, though: It doesn't seem to be a port of an actual C64 game.

JaggerJo 35 minutes ago

How does it render pixel data to the terminal?

I've stumbled over sixels [1], but movy seems to use something else that also enables color output and a higher resolution?

[1]: https://en.wikipedia.org/wiki/Sixel

EDIT:

> It renders frames as ANSI half block characters..

Seems like the resolution looks better than it actually is in the screenshots. It effectively seems to be 2 vertical Pixels per character.

anthk 3 days ago

I'd love Metal Warrior (and Hessian) ported to SDL2 and some 6502 CPU library similar to what the Super Mario World port for PC it's using to emulate 6502's Big Brother.

Also, the author it's amazing; I was looking for this https://github.com/M64GitHub/6510-emulator-c in order to run Metal Warrior 1-4 (and a few more c64 demos) under my n270 ATOM based netbook without getting mad with VICE. I already use FastSID instead of resid and I rebuilt it against SDL1 and disabled some OpenGL effects, but it doesn't run 100% fast.

Yes, I tried with x64 instead of x64sc.

Maybe one day I'll be competent enough to create some simple SDL2 based emulator with that core plus the 6502...

teddyh 18 hours ago

If this leads to more and more advanced graphic features in terminals, how long before MGR is effectively reimplemented?

moondev 8 hours ago

> (Excerpt from the 64k Demo "Universal Sequence" from the amazing demo group "Conspiracy")

First time I have seen this. Incredible music and intense gfx all packaged under 64k? Impressive as hell.

foobarqux 20 hours ago

mpv can play to the terminal using ascii codes or sixel/kitty-protocol.

anthk 3 days ago

Just use mplayer -vo aa (or mpv).

For terminals and the framebuffer, either fbdev or KMS.

  • aidenn0 19 hours ago

    Movycat looks most like mpv's "-vo tct" option. It uses ASCII half-blocks which is the same as what TCT defaults do.

    (Playing animated content with "-vo tct --vo-tct-256=yes" is a great way to get early-90s video game vibes.