It is currently Sat Oct 21, 2017 12:39 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Gradient sky background
PostPosted: Sun Jan 19, 2014 12:43 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19114
Location: NE Indiana, USA (NTSC)
The NES doesn't have HDMI. It doesn't even have HDMA. Nor does it have a lot of intermediate color shadess like those needed for a night sky background. So I needed to make a gradient sky background a different way. I made 1/8, 1/4, 3/8, and 1/2 density repeating tiles and checked them in blargg's snes_ntsc to make sure the diagonal stripes aren't as obvious as they are in, say, the title screen of Dr. Mario. Then I made transitions between the stripes, placing pixels carefully to make the artifacts blend into the RF noise. Finally I flipped the tiles horizontally and vertically and inverted them to make the bottom half of the transition.

Attachment:
File comment: Sky background, including an 8-pixel-wide repeating pattern
fdmockup_gradient.png
fdmockup_gradient.png [ 690 Bytes | Viewed 3969 times ]

Attachment:
File comment: Sky background on a TV, as simulated with snes_ntsc (please zoom)
fdmockup_gradient.jpg
fdmockup_gradient.jpg [ 33.44 KiB | Viewed 3969 times ]


Feel free to use this 8x128 pixel gradient pattern in your games. The pattern might need to be modified for ColecoVision, MSX, SMS, and Genesis games because of their VDPs' vertical color artifact pattern. Is there a preview program like snes_ntsc that takes a 256px or 320px image and renders it for these platforms?


Top
 Profile  
 
PostPosted: Sun Jan 19, 2014 1:02 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
tepples wrote:
The pattern might need to be modified for ColecoVision, MSX, SMS, and Genesis games because of their VDPs' vertical color artifact pattern. Is there a preview program like snes_ntsc that takes a 256px or 320px image and renders it for these platforms?

The sms_ntsc library's demo should accept a .bmp file. I believe it covers Coleco, MSX, and SMS. Genesis has a slightly different pixel clock in its native modes.


Top
 Profile  
 
PostPosted: Sun Jan 19, 2014 1:17 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10066
Location: Rio de Janeiro - Brazil
Too noisy IMO. When you use heavy dithering like this for foreground objects it looks OK, but it doesn't work as well with skies, 'cause they aren't supposed to have any texture. This picture looks particularly weird, considering that the dirt, which is supposed to have some texture, is completely flat.

Considering all the limitations of the NES, horizontal stripes are the best for sky gradients IMO. It might not be very realistic, but it's a pleasant stylized look, unlike heavy dithering that ends up looking like noise.

EDIT: I couldn't find any examples of skies, but look at the gradients in the title screens of Seirei Densetsu Lickle and Darkwing Duck, or the enemy introduction screens in Mega Man 4. There are probably many more examples. There's a homebrew game on the MSX with a sky like this: The Cure. I think it looks infinitely more pleasant than the alternative.


Top
 Profile  
 
PostPosted: Sun Jan 19, 2014 2:34 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19114
Location: NE Indiana, USA (NTSC)
blargg wrote:
The sms_ntsc library's demo should accept a .bmp file.

And the makefile I made for snes_ntsc worked with pretty much no change. Thanks.

How exactly does the pixel clock in the 32-tile mode of the Genesis differ? I thought it was 3 pixels per 2 NTSC subcarrier cycles, just like CV/MSX/SMS. I know the 40-tile mode differs, as that's supposed to be 15 pixels per 8 cycles.

tokumaru wrote:
the dirt, which is supposed to have some texture, is completely flat.

There's another problem: the intended art style is such that something solid and not potentially visible to the player's character is solid. (Compare screenshots of Pinobee for GBA, where anything solid is completely black.) I guess I could add texture to the left and right edges of dirt.

tokumaru wrote:
Considering all the limitations of the NES, horizontal stripes are the best for sky gradients IMO.

Like this?


Attachments:
fdmockup_hlinegradient.png
fdmockup_hlinegradient.png [ 546 Bytes | Viewed 3945 times ]
Top
 Profile  
 
PostPosted: Sun Jan 19, 2014 3:13 pm 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
tokumaru wrote:
Too noisy IMO. When you use heavy dithering like this for foreground objects it looks OK, but it doesn't work as well with skies, 'cause they aren't supposed to have any texture.

This reminds me that scrolling would look "twinkly" since it's lots of lone pixels on black. The intro level on Castlevania is a good example of this.

tepples wrote:
How exactly does the pixel clock in the 32-tile mode of the Genesis differ? I thought it was 3 pixels per 2 NTSC subcarrier cycles, just like CV/MSX/SMS. I know the 40-tile mode differs, as that's supposed to be 15 pixels per 8 cycles.

I'm not familiar with the tile modes. It's probably the 40-tile mode that differs, which is what most Genesis games use from what I can tell. Some notes:
53.6931 MHz master oscillator
6.7116375 MHz pixel rate (master/8)
14.31818 MHz color carrier quadrant rate
2.133336313 color carrier quadrants per pixel


Top
 Profile  
 
PostPosted: Sun Jan 19, 2014 3:24 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7232
Location: Chexbres, VD, Switzerland
Well personally I like to use single or 2 line dithering, followed by larger area of constant colour. It's "best of both", you get the solidity of constant colours, but the smoothness of dithering in the transitions.


Top
 Profile  
 
PostPosted: Sun Jan 19, 2014 4:42 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10066
Location: Rio de Janeiro - Brazil
tepples wrote:
There's another problem: the intended art style is such that something solid and not potentially visible to the player's character is solid. (Compare screenshots of Pinobee for GBA, where anything solid is completely black.)

I see. Well, this style really clashes with the sky. One more reason to approach the sky gradient differently, I guess.

Quote:
I guess I could add texture to the left and right edges of dirt.

That would probably add more depth to the whole thing.

Quote:
Like this?

Without any in-between colors it will be hard to pull off a convincing gradient, but yeah, I do think this is slightly better than what you had before. The actual pattern could probably be tweaked a bit. I'd probably widen the middle section, where both colors are distributed equally, and try avoid the bevel effect that appears to have formed around it. I could try drawing a different pattern, but I only have a touchpad to work with right now and I really can't draw with it.


Top
 Profile  
 
PostPosted: Mon Jan 20, 2014 3:26 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2131
Location: Minneapolis, Minnesota, United States
Even if you took the first gradient example and made the bottom 2/3 of the sky solid, it would make it less distracting. Complex dithering patterns can be hard on the eyes. I like to keep it simple, keeping colors mostly solid with light dithering between them. Perhaps the example would also look better dithering the two darkest blues instead of black and dark blue? I could certainly be wrong about this.

The 2nd example is also a little distracting. The way the lines are spaced, it creates the illusion of depth (like looking down a corridor).


Top
 Profile  
 
PostPosted: Mon Jan 20, 2014 4:14 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19114
Location: NE Indiana, USA (NTSC)
With shading on the left and right sides of platforms, with the smaller gradient (top 40% of play area), horizontal lines:
Attachment:
fdmockup_smallhline.png
fdmockup_smallhline.png [ 697 Bytes | Viewed 3841 times ]

Attachment:
fdmockup_smallhline.jpg
fdmockup_smallhline.jpg [ 18.29 KiB | Viewed 3841 times ]


With shading on the left and right sides of platforms, with the smaller gradient (top 40% of play area), dithered:
Attachment:
fdmockup_smallgradient.png
fdmockup_smallgradient.png [ 781 Bytes | Viewed 3841 times ]

Attachment:
fdmockup_smallgradient.jpg
fdmockup_smallgradient.jpg [ 24.94 KiB | Viewed 3841 times ]


Top
 Profile  
 
PostPosted: Tue Jan 21, 2014 7:30 am 
Offline
NESICIDE developer
User avatar

Joined: Mon Oct 13, 2008 7:55 pm
Posts: 1026
Location: Minneapolis, MN
tepples wrote:
Attachment:
fdmockup_smallgradient.jpg


This looks fantastic compared to the first. Gives the illusion of approaching night-dark, where the sky is still a bit blue by the horizon but deep night is on the way. Maybe add a couple (don't go crazy) stars like a light gray pixel here and there at the *very* top?


Top
 Profile  
 
PostPosted: Tue Jan 21, 2014 7:37 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7232
Location: Chexbres, VD, Switzerland
I agree, a good portion of solid blue makes all the difference, it now looks great.


Top
 Profile  
 
PostPosted: Tue Jan 21, 2014 12:06 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19114
Location: NE Indiana, USA (NTSC)
cpow wrote:
This looks fantastic compared to the first. Gives the illusion of approaching night-dark, where the sky is still a bit blue by the horizon but deep night is on the way.

Thanks.

Quote:
Maybe add a couple (don't go crazy) stars like a light gray pixel here and there at the *very* top?

Yeah, I was thinking of doing something like Star Force: a few behind-background sprites near the top that don't scroll with the background.


Top
 Profile  
 
PostPosted: Tue Jan 21, 2014 2:17 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2131
Location: Minneapolis, Minnesota, United States
This definitely looks a lot better. I think the gradient looks better this time than the line technique, but you'd have to test it out in the context of the actual game play to be sure which is more appropriate (I'm assuming this is for a game?).


Top
 Profile  
 
PostPosted: Tue Jan 21, 2014 2:20 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19114
Location: NE Indiana, USA (NTSC)
It's for a 2-way scrolling shoot-em-up. The closest analogy I can come up with is Fantasy Zone or what Balloon Kid/Hello Kitty World or SCAT would be if it didn't autoscroll. Once I get characters designed, I'll post what it looks like with sprites on top.


Top
 Profile  
 
PostPosted: Sat Jan 25, 2014 4:46 am 
Offline

Joined: Thu Mar 02, 2006 12:30 pm
Posts: 168
Sounds similar to Uridium on the C64 in terms of gameplay. Sounds like a quality game :)

_________________
Read my blog! The Incoherent Ramblings of a Lowly Geek


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group