3 ms·
cool!! what is this amazing little yeso.h library?! My googling is coming up empty... btw, a cool platform to experiment with things like this is the Commodo
by diydsp 2y ago
cool!! what is this amazing little yeso.h library?! My googling is coming up empty...
btw, a cool platform to experiment with things like this is the Commodore 64... You can fill the 40x25 screen with the same 8x8 character, then modify that character and it fills the whole screen. This can also be be expanded to make cool animations and whatnot.
- kragen 2y agothere's a readme at https://gitlab.com/kragen/bubbleos/-/tree/master/yeso https://gitlab.com/kragen/bubbleos/-/tree/master/yeso. it's about 19 kilobytes, has c, python, and lua bindings, and runs on x-windows or the linux framebuffer. feedback is welcome i never had a working c64, but i did what you're describing on the c64 on the ti-99/4a, and it's pretty similar to how vga text modes and the nintendo work as well. it was an important technique when 64k was a lot of ram and cpus were slow enough that you couldn't rewrite the whole framebuffer every frame (much less generate the video waveform on the fly in software). nowadays it just saves you five lines of code for (int y = 0; y < fb.size.y; y++) { ypix *p = yp_line(fb, y); for (int x = 0; x < fb.size.x; x++) { char sc = stipple[(y % 4) * 8 + (x % 4) * 2]; p[x] = (sc == '.' ? 0 : -1); } } a modern equivalent might be fragment shaders like https://www.shadertoy.com/view/XtcBWH https://www.shadertoy.com/view/XtcBWH, which i made six years ago; like the stipple pattern we started out this thread with, it simulates the appearance of woven cloth or basketry