This will be tricky, as original switched to CGA 320x200 graphics mode to display image, and there is no universal way of doing so in POSIX. SDL would be an option, as it chooses the display backend based on platform, environment and user permissions, so it could open a new window on X, use the framebuffer on console, or fallback to aalib/libcaca for ASCII art.
But adding SDL, even as an optional dependency, would kind of defeat the project's spirit: to be a text-only game, requiring nothing but libc and curses, just like traditional UNIX versions and clones, including the one shipped in bsdgames package.
There's an alternative approach which I'm quite fond of, suggested by a fellow contributor: to manually decode and "render" the image as colored, half-block text characters. In an 80x25 terminal this means a 1:4 scale, which depending on the downsample method can have a quite satisfactory result with 256 colors.
It could be a standalone executable (a bash script), or, preferably, C code integrated in the project. The latter is not trivial, as the render code would share the same curses initialization of the game (initscr() can only be called once, and so does winit()), but it may require very different settings, as the color palette for example.
This will be tricky, as original switched to CGA 320x200 graphics mode to display image, and there is no universal way of doing so in POSIX. SDL would be an option, as it chooses the display backend based on platform, environment and user permissions, so it could open a new window on X, use the framebuffer on console, or fallback to aalib/libcaca for ASCII art.
But adding SDL, even as an optional dependency, would kind of defeat the project's spirit: to be a text-only game, requiring nothing but
libc
andcurses
, just like traditional UNIX versions and clones, including the one shipped inbsdgames
package.There's an alternative approach which I'm quite fond of, suggested by a fellow contributor: to manually decode and "render" the image as colored, half-block text characters. In an 80x25 terminal this means a 1:4 scale, which depending on the downsample method can have a quite satisfactory result with 256 colors.
It could be a standalone executable (a
bash
script), or, preferably, C code integrated in the project. The latter is not trivial, as the render code would share the same curses initialization of the game (initscr()
can only be called once, and so doeswinit()
), but it may require very different settings, as the color palette for example.