First attempt at NES graphics, please comment!

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
First attempt at NES graphics, please comment!
by on (#168694)
Hi! So this is my first attempt at nes specific graphics. It's supposed to be a graphic prologue that scrolls slowly at a set pattern, and use sprites to display overhead text (very limited capabilities, i know).

Image

It is using up four palettes. All of them have a common black and a common blue. Wanted to add purple but couldn't fit it as for now with all the current choices.

Doing any real level design at this point would be counterintuitive, so this is basically a doodle that just maybe will turn out useful.
What do you think? Any comments, the good and the bad, are appreciated!

Edit: Also, i wonder, have i put too much in the upper part if i'd like to scanline distort/parallax that part?
Re: First attempt at NES graphics, please comment!
by on (#168700)
This looks pretty good! Advanced lighting is not ready on the NES. However, it doesn't look as colorful as I'd expect from a scene that uses all 4 palettes.

As for parallax effects, the only problem I see is that those 3 columns at the top could be overlapping some background elements you may want to move.
Re: First attempt at NES graphics, please comment!
by on (#168712)
I absolutely love this. There's a really cool aesthetic to the scene and I love how you used black as the dominant color. I'm slightly confused about what can be walked on but this is a really natural-looking tileset nevertheless.

Like tokumaru said, your scene is a little monochromatic for something that uses all 4 palettes. You could easily combine them into 2 and very little would be lost:

Image

Even if you don't use the other 2 palettes for background art, they could always be used for GUI, giant background enemies or palette-shifting items like coins.
Re: First attempt at NES graphics, please comment!
by on (#168736)
That looks awesome.

If you wanted to do parallax scrolling on that screen, one possibility if you want to have some columns in the foreground, would be to put a portion of those upper columns on the sprite layer.
Re: First attempt at NES graphics, please comment!
by on (#168745)
This is very gorgeous ! For a so-called "first-attempt" this is incredible.

Is this scene supposed to be underwater? Because it appears to be.

For the scrolling text, you could just shift every letter one pixel down (or up) to the next, so that you can get "lines" of more than 8 characters. The major problem is that, obviously, the text will bend upwards or downwards, and in some cases this can be very weird. You're still limited to 64 letters on screen, obviously. (*)

(*) Yes, technically you could make a very clever use of 8x16 sprites and/or use multiple sprite pages and switch mid-frame but I don't think that's a good idea nor is it practical.
Re: First attempt at NES graphics, please comment!
by on (#168749)
Very atmospheric. Despite what the others have already said about the number of colors you used, I think you're pretty good at conveying a scene with as little as two of them. Excuse me while I take notes on your mountains. :P

If you're already doing scanline effects, you could always use another scroll split for text. You can animate it more or less however you like, as long as it spans the full width of the screen and has an opaque background.
Re: First attempt at NES graphics, please comment!
by on (#168762)
Looks frickin' awesome! Sorta reminds me, distantly, of some of the graphics in Battle of Olympus, just with way better quality. :)
Re: First attempt at NES graphics, please comment!
by on (#168766)
Yeah, I also got a Battle of Olympus vibe, for whatever reason. Looks pretty decent.
Re: First attempt at NES graphics, please comment!
by on (#168859)
thefox wrote:
Yeah, I also got a Battle of Olympus vibe, for whatever reason. Looks pretty decent.


Maybe due to similar colors to this part?

Image
Re: First attempt at NES graphics, please comment!
by on (#168864)
Yes, and a few other areas. But I don't see the point in going over all the visual comparisons to Battle of Olympus, as it's kinda besides the point; the point is, the graphics drawn here are quite well done, clever, and beautiful. :)
Re: First attempt at NES graphics, please comment!
by on (#168868)
Thanks, all! I'm learning much from these remarks. Here's my afterthoughts/responses:

BoO was one game i never had, and never taken the time to play through, but i just watched a playthrough and do like what the title screen/ending does, among other things. Also for an '88 game, i think it looks really fine. Besides the comparison above, the columns i included may suggest something like that too. I am surprised noone has made a comparison to dracula's curse / castle of cagliostro theme yet! :mrgreen: (link to comparison of the two). I wanted it to be a reference to games and film taking place in a vague concept of Europe, rather than a specific location in the same. The column capitals in my screen are a derivate of the yonic style but made assymetric to denote something otherworldly. I think the ones in BoO are supposed to be doric or maybe toscan, but it's hard to tell and who knows what efforts they made.

I never thought of it as an underwater scene, but i can totally see how it can be interpreted as such. the blue field is supposed to be a misty lake with mountains and a waterfall in the distance, while the foreground is supposed to be cliffs above. The picture is supposed to convey two cycles of decline: first the temple site was abandoned, and then the adjecting, newer hamlet.

Regarding the mountains, i have a pretty simple rule set up for my self: the more distant something is, the less detail and colour should be used.

So, here's what i've gathered so far:
-Some tiles need to be less vaguely implemented, or edited to clarify the context. More specifically, the 'rotten wood' pattern i made for doors and which i reuse in the lower left for abstract background may be interpreted as seaweed or something. The lake itself may need some further definition to not look like a band of mist.
-The hithermost cliffside to the lake needs to be more clear?
-maybe lower the 'foreground' a bit
-make it ntsc-proof
-make clear rules on what is being used to convey solid and nonsolid. Even if this screen isn't meant to be playable, its assets would be used in actual levels.
-palettes can be reduced more than i thought to convey something similar, and the freed up palettes may be used in better ways.

I managed to add purple at the cost of a few extra tiles w/o palette reduction before reading these comments. I'll update when i have something more solid to show. :D
Re: First attempt at NES graphics, please comment!
by on (#168902)
I hate to be the only negative voice here, but those columns really ought to be flat on the top. I mean, that's what a column is there for: to put stuff on top of it. Even if whatever it once supported is gone, it still ought to be flat on the top, or very clearly broken off.

The composition also seems in need of improvement. There is an awkward relation between perceived line on the bottom-left and the negative space in middle. I think it would be vastly improved by simply moving that bottom-left column over just sixteen pixels. Also, the nearer (lower) edge of the water, I think it would be improved with a more organic shape that pulls in to the blank area a bit more.

Here is a very rough example.

Attachment:
greco.png
greco.png [ 15.44 KiB | Viewed 5952 times ]
Re: First attempt at NES graphics, please comment!
by on (#168913)
No problem, i need to hear it!

The column capitals were originally flat, but i thought it looked less appealing, so i took that out. But i probably should have just put some more time in it. First i thought it added to the outlandish/alien feel of the place, but i totally see what you mean, and i've made a new attempt at it that i'll include in the next update.

It is also my intention to fix that cliff/lake line, which i thought looked cheap immediately after uploading. :oops: It is currently also breaking my simple distance/detail rule, which then in effect is misleading the viewer.
Re: First attempt at NES graphics, please comment!
by on (#168937)
Possibly a little overdetailed, but here's an update. I have trouble seeing on my laptop if the colour on the water reflection is ok or horrible. But I think it will be something roughly along these lines until other requirements demand cutdowns.

I tried to follow this rule for possible level mechanics this time:
2x2 tile platforms are proper solid, 1x with 90 degree corners are jump/drop-through solids, stuff that's just a thin cliff or the like is suppes to be air/background.

Image
Re: First attempt at NES graphics, please comment!
by on (#168939)
That looks a million times better.
Re: First attempt at NES graphics, please comment!
by on (#168943)
WheelInventor wrote:
Possibly a little overdetailed, but here's an update. I have trouble seeing on my laptop if the colour on the water reflection is ok or horrible. But I think it will be something roughly along these lines until other requirements demand cutdowns.

I tried to follow this rule for possible level mechanics this time:
2x2 tile platforms are proper solid, 1x with 90 degree corners are jump/drop-through solids, stuff that's just a thin cliff or the like is suppes to be air/background.

What we actually need at this point is this image running on actual hardware. What's often not taken into consideration when drawing graphics on the NES is what the end result looks like under NTSC on an actual TV. The difference can be substantial. The closest thing we can do (without an actual NES ROM of this) is to use blargg's ntsc filter library to see what the results "might" look like.

Are the above graphics available in any kind of format that's generally compatible with the NES, e.g. name table + attribute table + pattern table + palette data? If so, I can probably throw together a ROM of it. I can get video output from an actual NES as well. Tepples' Graphics Editor should be able to do all this with ease (and I'm happy to put in the time). In fact, since the source image is PNG, I think I can do it now... I'll give it a shot.
Re: First attempt at NES graphics, please comment!
by on (#168946)
Blargg's NTSC filter covers the vast majority of "unexpected" changes from clean pixels to a real NES environment. The NTSC conversion creates several types of artifacts (most notably with 50% dither), but everything beyond this is really just things like colour gamut and scanlines, kinda superficial stuff.

If you're running windows, you can get a ready-made build of blargg's program here: viewtopic.php?f=21&t=11947

Here's what your last image looks like through the NTSC filter:
Attachment:
test3_filtered.png
test3_filtered.png [ 169.69 KiB | Viewed 3728 times ]
Re: First attempt at NES graphics, please comment!
by on (#168947)
Thanks, rainwarrior -- I had no idea there were pre-built binaries for that (I dug around blargg's site first looking for 'em). I was getting no where with the Graphics Editor due to Python problems (guess tepples will have to work these out).

Code:
D:\downloads\editor-0.05\tools>C:\Python27\python.exe savtool.py ..\test3-256x240.png ..\test3.sav
Traceback (most recent call last):
  File "savtool.py", line 790, in <module>
    main()
  File "savtool.py", line 699, in main
    sav = load_bitmap(infilename)
  File "savtool.py", line 423, in load_bitmap
    return bitmap_to_sav(Image.open(filename))
  File "savtool.py", line 377, in bitmap_to_sav
    im = pilbmp2chr(im, 8, 8)
  File "D:\downloads\editor-0.05\tools\pilbmp2nes.py", line 57, in pilbmp2chr
    outdata.append(formatTile(tile))
  File "D:\downloads\editor-0.05\tools\pilbmp2nes.py", line 37, in <lambda>
    formatTile=lambda im: formatTilePlanar(im, 2)):
  File "D:\downloads\editor-0.05\tools\pilbmp2nes.py", line 28, in formatTilePlanar
    if px & 0x01:
TypeError: unsupported operand type(s) for &: 'tuple' and 'int'
Re: First attempt at NES graphics, please comment!
by on (#168950)
Thanks! I began in yy-chr, but i'm trying out shiru's NES screen tool at the moment. The tileset contains a fair amount of garbage, but i can export it in a minute to save you the hassle if you still want to test it on real hardware.

Just installed cc65 too, but haven't set it up yet. the .cfg gave me a slight headache but i've seen that topic answered eslewhere.

the ntsc thingy made the mountain reflection very teal. Maybe a bit weird?
Re: First attempt at NES graphics, please comment!
by on (#168952)
No need to test on hardware given blargg's NTSC filter -- what you see above is pretty much what you'll see on actual hardware (hues/etc. are going to vary based on people's TV screens though).

As for the teal reflection: welcome to the NES's limited palette (and when drawing graphics in editors like YY-CHR, no palette there is ever going to match the NES perfectly, sorry to say) and NTSC (a.k.a. "Never The Same Colour"). This is one of several reasons why an artist seeing their work on real hardware (or as close as possible -- blargg's stuff is pretty damn accurate) is important.
Re: First attempt at NES graphics, please comment!
by on (#168955)
WheelInventor wrote:
the ntsc thingy made the mountain reflection very teal. Maybe a bit weird?

The NTSC demo program lets you control contrast and sharpness with the mouse, I think I took the picture with high contrast. In general, though, this is to be expected when you go between different TVs and monitors, relative contrast of colours is going to vary a lot.

Brightness is consistent up and down a single hue column, but when you're mixing colours on the same row especially, different TVs will shift the brightness of various hues up and down. It won't be a robust relationship.
Re: First attempt at NES graphics, please comment!
by on (#168959)
Ok, so nesst is repeatedly throwing me an access violation when i try to open my last session. At least i have the png, but this kind of blows. Anyone else get this error with this file? :(

https://sprend.com/download.htm?C=4c1e6fed65924ce3ba31749fdb72307b

Quote:
mixing colours on the same row

Very valuable lesson! Was this ever in practice or was it avoided at all costs?
Re: First attempt at NES graphics, please comment!
by on (#168960)
I don't think there's anything about it that warrants "avoid at all costs". I mean, most graphics will still look "fine" if you put them on different TVs, even though the balance of hues is different. The question is really how much worse it will look, which depends one how you use it.

The problem is when you spend a lot of time trying to get even colour balance on your personal version of the colours, you will end up making art that starts to look bad as soon as that subtle balance is disrupted.

A lot of games go with "monochromatic" palettes. Many Mega Man games tend to use only 1 hue column for a single tile or sprite (and/or black/white). This is very robust because you're avoiding the hue balance problem entirely. The tradeoff is obvious though: missing out on potentially interesting colour combinations.

If you go into it with the right expectations, mixing hues is not verboten. Just try to test it out in different environments sometimes. Stick it in an emulator that has hue/brightness/contrast/sharpness controls, for example, and see how it stands up.


NES music has a similar problem: if your mixing relies heavily on subtle balance of volume (especially with Famicom expansion sound), as soon as you take it to another machine with different balance, the mix falls apart. On the other hand, if you write in a way that can tolerate various channels being a little louder or softer, you get a result that will sound well on many machines. I think this is one of the reasons Bach's music turns up in video games so often; his style of contrapuntal writing doesn't rely on balance like that.
Re: First attempt at NES graphics, please comment!
by on (#168961)
Like, I often see ZX Specrum art using rainbow colours, and I think the reason is basically that because it only has two brightness levels for any given colour, hue is being used as a substitute for finer brightness control.

The same phenomeon happens on the NES. The granularity of brightness is quite limiting, and it's tempting to use hue to compensate; but as just stated, this is unreliable. It's basically... the NES is a low precision machine in this respect. If you try to make distinctions that are smaller than its level of precision, they just aren't going to hold up well. Hue distinctions that are stronger than the basic granularity of precision will still work fine, if you understand what I mean.

  • choosing three colours "vertically" so there is no change of hue: this works fine, the NES should always be consistent (i.e. monotonic brightness) within a column
  • choosing three colours "horizontally" so there is no change of brightness: the imprecision of the system will cause different hues to stand out more depending on whose machine it is.
  • choosing three colours "diagonally" so there is a change of hue and brightness at the same time: this usually works well because it is not relying on hue or brightness alone.

I think the worst problem is caused by semi-horizontal colours. Like, if you take two colours from row 1 and a third colour from row 2, and expecting one of those "hues" to be in between the other two in brightness. I see people try this a lot when they're given an "NES palette" and assume it's going to look the same everywhere.
Re: First attempt at NES graphics, please comment!
by on (#168962)
Quote:
I think the worst problem is caused by semi-horizontal colours. Like, if you take two colours from row 1 and a third colour from row 2, and expecting one of those "hues" to be in between the other two in brightness. I see people try this a lot when they're given an "NES palette" and assume it's going to look the same everywhere.


Guilty as charged, the lake does precisely that! I suppose PAL has the same problems too for the same reasons. I could either make it black if i wanted it to be more sturdy, or experiment with wider/tigher hues, or come up with something different, but i'm stuck with the file problem atm.

I've tried a couple of things to get nesst to open the session now, but nothing gives so far. I call it a day. We'll see what happens tomorrow.
Re: First attempt at NES graphics, please comment!
by on (#168964)
WheelInventor wrote:
Ok, so nesst is repeatedly throwing me an access violation when i try to open my last session. At least i have the png, but this kind of blows. Anyone else get this error with this file? :(

https://sprend.com/download.htm?C=4c1e6fed65924ce3ba31749fdb72307b

If you still have the palette data, and you are willing to install Python and Pillow (see Windows instructions) and learn to use the command prompt, you can use the savtool.py program that ships with my on-NES graphics editor to attempt to reconstitute the CHR and NAM from the PNG.

Quote:
Quote:
mixing colours on the same row

Very valuable lesson! Was this ever in practice or was it avoided at all costs?

In Haunted: Halloween '85, whose backgrounds are dark in general because it takes place at nighttime, I tried to discourage the artist from using $06, $07, and $08 in close proximity because the result was muddy on my TV. But the artist insisted on grounds that the artist liked how it looked in the emulator-derived palette he was using, and the results were (barely) acceptable on his NES + PowerPak + TV.
Re: First attempt at NES graphics, please comment!
by on (#168970)
tepples wrote:
If you still have the palette data, and you are willing to install Python and Pillow (see Windows instructions) and learn to use the command prompt, you can use the savtool.py program that ships with my on-NES graphics editor to attempt to reconstitute the CHR and NAM from the PNG.

Or one can't because Python strikes again. I look forward to knowing what the bug there is.
Re: First attempt at NES graphics, please comment!
by on (#168972)
koitsu wrote:
Code:
D:\downloads\editor-0.05\tools>C:\Python27\python.exe savtool.py ..\test3-256x240.png ..\test3.sav
Traceback (most recent call last):
[...]
  File "D:\downloads\editor-0.05\tools\pilbmp2nes.py", line 28, in formatTilePlanar
    if px & 0x01:
TypeError: unsupported operand type(s) for &: 'tuple' and 'int'

Does this exception clear up if you convert the PNG image to indexed format, as opposed to RGB? Where is test3-256x240.png with which to reproduce?
Re: First attempt at NES graphics, please comment!
by on (#168973)
It was created using convert.exe -resize 256x240 in ImageMagick 6.9.2 for Windows. Original PNG is in this post, resized PNG attached. Still looking forward to knowing what the bug is. :-)
Re: First attempt at NES graphics, please comment!
by on (#168974)
I reproduced the bug, and my suspicion was correct: savtool currently 1. does not support source images that are RGB as opposed to using a colormap, and 2. produces a traceback instead of a comprehensible warning if the user attempts to convert a file that is RGB.
Code:
$ file test3-256x240.png
test3-256x240.png: PNG image data, 256 x 240, 8-bit/color RGB, non-interlaced

I opened test3-256x240.png in GIMP and noticed that convert had scaled it down with anti-aliasing, which distorts colors on edges. When reversing magnification of pixel art, use point sampling, also called nearest neighbour. So I opened the original PNG in GIMP, converted it to indexed color, and scaled that down to 256x240 pixels with nearest neighbour.
Code:
$ file greco.png
greco.png: PNG image data, 256 x 240, 4-bit colormap, non-interlaced
$ ./savtool.py greco.png greco.sav && ls -l greco.sav && ./savtool.py --show greco.sav
-rw-rw-r-- 1 pino pino 8192 Apr 20 23:53 greco.sav

Because I did not provide a 32-hex-digit palette string, it used the default (grayscale) palette.
Re: First attempt at NES graphics, please comment!
by on (#168976)
koitsu wrote:
tepples wrote:
If you still have the palette data, and you are willing to install Python and Pillow (see Windows instructions) and learn to use the command prompt, you can use the savtool.py program that ships with my on-NES graphics editor to attempt to reconstitute the CHR and NAM from the PNG.

Or one can't because Python strikes again. I look forward to knowing what the bug there is.

The Coiler strikes back and bites again! :P
Re: First attempt at NES graphics, please comment!
by on (#168977)
The original source file (test3.png) is also RGB. I can't seem to get ImageMagick to do the conversion into whatever it is your program demands:

Code:
D:\downloads\editor-0.05>..\ImageMagick\convert.exe -verbose -define png:color-type=3 -resize 256x240 test3.png test4.png
test3.png PNG 512x480 512x480+0+0 8-bit sRGB 18.9KB 0.016u 0:00.017
test3.png=>test4.png PNG 512x480=>256x240 256x240+0+0 8-bit sRGB 0.031u 0:00.020
convert.exe: Cannot write PNG8 or color-type 3; colormap is NULL `test4.png' @ error/png.c/WriteOnePNGImage/9270.

The -define png:color-type=3 argument comes from here.

It looks like the source image uses sRGB colour space, but it's a "truecolour" image, even though the bit depth is 8. Screwing around with -define png:bit-depth doesn't fix it either. Below comes from identify.exe -verbose test3.png -- note the "Properties" section:

Code:
D:\downloads\editor-0.05>..\ImageMagick\identify.exe -verbose test3.png | more
Image: test3.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 512x480+0+0
  Resolution: 47.24x47.24
  Print size: 10.8383x10.1609
  Units: PixelsPerCentimeter
  Type: Palette
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    Pixels: 245760
    Red:
      min: 0 (0)
      max: 175 (0.686275)
      mean: 12.0967 (0.0474382)
      standard deviation: 19.8448 (0.0778226)
      kurtosis: 19.1082
      skewness: 3.01808
      entropy: 0.456241
    Green:
      min: 0 (0)
      max: 238 (0.933333)
      mean: 18.7621 (0.0735767)
      standard deviation: 38.1136 (0.149465)
      kurtosis: 11.8537
      skewness: 3.27242
      entropy: 0.616345
    Blue:
      min: 0 (0)
      max: 238 (0.933333)
      mean: 70.9639 (0.27829)
      standard deviation: 78.8948 (0.309392)
      kurtosis: -1.66944
      skewness: 0.369543
      entropy: 0.581827
  Image statistics:
    Overall:
      min: 0 (0)
      max: 238 (0.933333)
      mean: 33.9409 (0.133102)
      standard deviation: 51.868 (0.203404)
      kurtosis: 4.21331
      skewness: 2.44243
      entropy: 0.551471
  Colors: 8
  Histogram:
    127020: (  0,  0,  0) #000000 black
     24696: (  0, 50,102) #003266 srgb(0,50,102)
      3360: (  0,109,153) #006D99 srgb(0,109,153)
      8456: (  0,116, 60) #00743C srgb(0,116,60)
     77324: ( 33, 13,173) #210DAD srgb(33,13,173)
      1656: ( 44,200,112) #2CC870 srgb(44,200,112)
      2116: ( 71,200, 32) #47C820 srgb(71,200,32)
      1132: (175,238,238) #AFEEEE PaleTurquoise
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Background color: white
  Border color: srgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 512x480+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2016-04-20T15:32:47-07:00
    date:modify: 2016-04-20T15:32:02-07:00
    png:gAMA: gamma=0.45454544 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 512, 480
    png:pHYs: x_res=4724, y_res=4724, units=1
    png:sRGB: intent=0 (Perceptual Intent)
    signature: f52fcdc1c44815504760255e0d05419c091383538b181f1213d63e540feda438
  Artifacts:
    filename: test3.png
    verbose: true
  Tainted: False
  Filesize: 18.9KB
  Number pixels: 246K
  Pixels per second: 11.17MB
  User time: 0.016u
  Elapsed time: 0:01.021
  Version: ImageMagick 6.9.2-8 Q16 x64 2015-12-05 http://www.imagemagick.org

In other words: PNG support with your program is going to be iffy at best given that, odds are, things are going to be outputting sRGB with truecolour and not indexed. This is probably outside of your hands, but yeah, explicitly stating what the requirements are somewhere (either in documentation or -help usage) would be good...
Re: First attempt at NES graphics, please comment!
by on (#168978)
Jarhmander wrote:

Yup, that was literally my first reaction (not kidding either). And in the process, I found another bug too:

Code:
D:\downloads\editor-0.05>..\ImageMagick\convert.exe -verbose -define png:color-type=3 test3.png test4.png

test3.png PNG 512x480 512x480+0+0 8-bit sRGB 18.9KB 0.031u 0:00.029
test3.png=>test4.png PNG 512x480 512x480+0+0 8-bit sRGB 9c 8.64KB 0.016u 0:00.010

D:\downloads\editor-0.05>C:\Python27\python.exe tools\savtool.py test4.png test4.sav
Traceback (most recent call last):
  File "tools\savtool.py", line 790, in <module>
    main()
  File "tools\savtool.py", line 699, in main
    sav = load_bitmap(infilename)
  File "tools\savtool.py", line 423, in load_bitmap
    return bitmap_to_sav(Image.open(filename))
  File "tools\savtool.py", line 388, in bitmap_to_sav
    raise IndexError("image has %d distinct tiles, which exceeds 256")
IndexError: image has %d distinct tiles, which exceeds 256

This is because the image is 512x480 -- but I particularly chuckled at the literal %d. I can't tell from any Python documentation I've skimmed whether or not IndexError() supports % conversion expandos. Nothing in the language ever gives me the impression such things are supported, instead it's always "hey man just use + for concatenation and let magic fairies and unicorns and rainbow pixies read your mind". Yeah, too bad computers don't work that way. Don't worry, this isn't a Python-specific bitch session either: Ruby is the same way.
Re: First attempt at NES graphics, please comment!
by on (#168979)
The most recent time I wanted a tool to deal with a destination format that must be palletized, I reluctantly concluded that the only possible vehicle for this was the crustiness that is GIF.

Well, or XPM, but let's be serious.

Anything else allows for UI failure where the generating program can silently save an image in the wrong format, requiring the converter to either fail or include its own conversion tools.
Re: First attempt at NES graphics, please comment!
by on (#168980)
rainwarrior wrote:
Here's what your last image looks like through the NTSC filter:
Image

You know, that looks so similar to one of the CGA palettes (black-turquoise-purple-gray) that now it makes me wonder how it'd look like if redrawn for CGA.
Re: First attempt at NES graphics, please comment!
by on (#168983)
Looks delicious.
Re: First attempt at NES graphics, please comment!
by on (#168986)
lidnariq wrote:
The most recent time I wanted a tool to deal with a destination format that must be palletized, I reluctantly concluded that the only possible vehicle for this was the crustiness that is GIF. ... Anything else allows for UI failure where the generating program can silently save an image in the wrong format, requiring the converter to either fail or include its own conversion tools.

Yeah, that's the same conclusion I reached. :-)
Re: First attempt at NES graphics, please comment!
by on (#168987)
Eh, if you used one of the composite color modes I bet it'd be nice.

( http://8088mph.blogspot.com/2015/04/cga ... rated.html )
Re: First attempt at NES graphics, please comment!
by on (#168994)
I stuffed it though my conversion tools and got this. Any good?
Re: First attempt at NES graphics, please comment!
by on (#168998)
Wow, this thread really took off after i went to sleep.

The zip worked wonders! The only thing i had to reassign was a single odd tile. The palettes are in different order but that's only to expect and has no practical effect (i tend to make them read black, light, medium, dark from left to right, which probably is counterintuitive). And most of the unused tiles in char was garbage anyway. Everything is back to normal. Thanks a lot!

I'll be sure to save everything in separate files from now on.


--
Regarding CGA, 8-bit guy does a quick redeeming roundup of the hardware in this vid.
Re: First attempt at NES graphics, please comment!
by on (#168999)
Could you be more specific about what my converter got wrong? The palette was generated automatically, so there's not much I can do about the order, but if the the output has errors or unused tiles, that's a bug.
Re: First attempt at NES graphics, please comment!
by on (#169000)
Nevermind, i discovered it was just a quirk with nesst. If one is using the mouse to double click on a file in the open dialogue, the last click registers as a click in the nametable viewer if it is directly underneath in windows, which changed that cell to the first selected tile. The order of palette colours doesn't bother. It was kind of redundant of me to remark even.

EDIT: to be perfectly clear, no unused tiles were in the new .chr. It was just my vague way to say 'very few tiles of importance got lost when the session file crapped, so it'll be a breeze to continue with your reconstitute files. i'm obliged'. :beer:
Re: First attempt at NES graphics, please comment!
by on (#169003)
I guessed that's what you meant, but I wanted to make sure. Cheers. :beer:

I made a ROM of it to check how it looked on various emulators, so I may as well post it. I don't have a flash cart to view it on hardware myself.
Re: First attempt at NES graphics, please comment!
by on (#169010)
koitsu wrote:
Code:
D:\downloads\editor-0.05>C:\Python27\python.exe tools\savtool.py test4.png test4.sav
Traceback (most recent call last):
[...]
  File "tools\savtool.py", line 388, in bitmap_to_sav
    raise IndexError("image has %d distinct tiles, which exceeds 256")
IndexError: image has %d distinct tiles, which exceeds 256

This is because the image is 512x480 -- but I particularly chuckled at the literal %d. I can't tell from any Python documentation I've skimmed whether or not IndexError() supports % conversion expandos.

My fault. I intended to type % num_tiles but must have forgotten at that time. I don't know whether I've fixed this bug in my local tree. I'll check when I'm back to that computer. Thank you for reporting it. I haven't got a lot of feedback in its own topic.

From lidnariq's post, I infer demand for a feature to allow use of either RGB or indexed color. I'll consider it for 0.06 at the same time I port it from Python 2 to Python 3.
Re: First attempt at NES graphics, please comment!
by on (#169025)
Holy wow this thread exploded into a direction I did not expect.

On the subject of how these images look on actual hardware, I want to share this interesting video about CGA graphics on a composite signal.
https://www.youtube.com/watch?v=niKblgZupOc

If you're in a hurry, here is the really fascinating part:
https://youtu.be/niKblgZupOc?t=6m23s
Re: First attempt at NES graphics, please comment!
by on (#169026)
Well, if we bring back the CGA topic:

Image

And for fun since it looks way more purple than I recalled, EGA with better colors:

Image

Not even gonna bother with VGA since it'd look exactly the same as the original =P
Re: First attempt at NES graphics, please comment!
by on (#169033)
If you're going to post the CGA RGBI image after we talked so much about composite color, I basically feel obliged to post something generated via reenigne's converter:
Re: First attempt at NES graphics, please comment!
by on (#169035)
Well, my CGA comment was about that palette I used. It was you guys who somehow thought I was talking about composite artifacts =/ (also why is the contrast so low on that pic...?)
Re: First attempt at NES graphics, please comment!
by on (#169038)
One reworked concept screen and this may-be-game became port ready :mrgreen:


EDIT:

Here's a comparison of four possible ntsc outcomes (too large to post) with a new palette colour for mountain reflection and deep shades. It is a bit more vague and flat, but i think the relationship is a lot more stable. In the worst case scenario according this test and my taste, the shade is at least colder without turning teal.

The other option i think is viable is doing it pitch black, but there's already so much of that going on.
Re: First attempt at NES graphics, please comment!
by on (#169050)
WheelInventor wrote:
One reworked concept screen and this may-be-game became port ready :mrgreen:


Welcome to the NesDev forums. We don't screw around.