I felt like making a real NES version of an image of Bill Murray made by Svetlana, but it used colours a little bit liberally and I wasn't sure if it could be managed or not. So... I wrote a quick python program to try to automate the process of building a nametable and overlaid sprites.
ROM: bill.nes
Source: bill.zip (ca65 + python 3)
The process looked like this:
1. Choose some palettes by hand. (This could probably be automated, but that'll be an exercise for the next time I do this.)
2. Generate nametable by choosing the attribute palette that will maximize the number of pixels in the corresponding nametable block.
3. Progressively create sprites from the leftover pixels.
There are a lot of different ways I could approach step 3. What I settled on for this project was to greedily take the sprite which maximizes pixel coverage. This worked okay for this, but was kinda subject to overlap problems, and also tends to isolate pixels at the edges, which end up taking up their own sprites.
Anyhow, this was just a quick and dirty project for me, but I thought it might be useful to share the source for anybody who needs an example.
(The music is also by Svetlana.)
ROM: bill.nes
Source: bill.zip (ca65 + python 3)
The process looked like this:
1. Choose some palettes by hand. (This could probably be automated, but that'll be an exercise for the next time I do this.)
2. Generate nametable by choosing the attribute palette that will maximize the number of pixels in the corresponding nametable block.
3. Progressively create sprites from the leftover pixels.
There are a lot of different ways I could approach step 3. What I settled on for this project was to greedily take the sprite which maximizes pixel coverage. This worked okay for this, but was kinda subject to overlap problems, and also tends to isolate pixels at the edges, which end up taking up their own sprites.
Anyhow, this was just a quick and dirty project for me, but I thought it might be useful to share the source for anybody who needs an example.
(The music is also by Svetlana.)