Clear pixels #45
Replies: 7 comments 12 replies
-
Nice. I think what you need is in the docs. Search for this...
|
Beta Was this translation helpful? Give feedback.
-
anyone know where the ANSI 8 bit color palatte is defined? |
Beta Was this translation helpful? Give feedback.
-
Here is my attempt. I used @rumbledethumps python code to convert a PNG. I used a hex editor to manually set the 5th bit on the colors I wanted opaque in the palette at the beginning of the BIN it generates, then I modified the python to make every color but black be opaque, but you could easily pick any color other than black to be transparent. I was running out of vram for my stick figure so I used ansi colors for it. My code is here: https://github.com/brentward/paralax/blob/main/src/hello.c and the bin files are included in the repository.
IMG_8430.MOV |
Beta Was this translation helpful? Give feedback.
-
IMG_6250.mp4you beat me to it ... i certainly need to work on getting some sprites working |
Beta Was this translation helpful? Give feedback.
-
I noticed with my last scene that when I changed the vga mode from 0 to 1 to prevent letterboxing I started getting the half blue screen meaning I was exceeding the fill rate capabilities. So I started experimenting with 4 bit per pixel stuff which let me get past the fill rate issue and I had more memory to increase the complexity of the animation slightly. This one was done in 4 bit per pixel mode. I made another script to truncate an 8 bpp palette to 4 bpp and to pack the pixel data from 8 bpp to 4 bpp. The memory was less constrained using 4 bpp. The scripts is pretty rough and doesn't do color conversion and only works correctly on specific image resolutions. It uses the binary output from the conversion script I posed above and requires that the pixel data itself already only be using 16 colors or less. But I thought it could be helpful to someone.
IMG_8432.MOV |
Beta Was this translation helpful? Give feedback.
-
Just a heads up that I plan on adding a 4-color mode and renumbering the options to insert it. |
Beta Was this translation helpful? Give feedback.
-
I just got a chance to try the inline fix and it works for me too, thanks!
|
Beta Was this translation helpful? Give feedback.
-
So playing around with scrolling some backgrounds one the 3 planes
Is there a clear color in the palates…
The background of my images is overlapping with other layers.
The scrolling is pretty smooth.
Beta Was this translation helpful? Give feedback.
All reactions