It is currently Tue Jul 16, 2019 5:30 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sun Apr 07, 2019 7:52 am 
Offline
User avatar

Joined: Fri Sep 11, 2015 10:39 am
Posts: 163
Another kind-of-random question that came to my mind, reflecting on some things I've seen in the games of my youth...

I remember a few years ago noticing a particular effect that seemed to be commonly used in Game Boy Color games, and at the time I kind of wondered what was so special about the hardware that led to so many games using it.
Now I understand exactly what the system is doing for this effect, and can recognize the many ways in which the same trick was used in so many other games on the NES, SNES, and so on.
The effect in particular can be seen here: https://youtu.be/UdVJY1gs6n4?t=21281
It is, of course, simply changing the point where it is drawing the background after each scanline. It's how NES games had nifty scrolling effects where clouds could fly by faster than the rest of the scenery, its how the SNES had nifty effects like the dancing flames in the background of the first stage of Dracula X, or the wavy water distortion effects in Magical Quest and Demon's Crest.

By the way, does this technique have a name? Is there some word or term I can use to refer to it without giving examples or explaining in detail how the system is drawing a different part of the background?

At any rate, this effect has seemed so brilliant and cool now that I understand what is going on, and it's great to see the many different ways people have used it to pull off interesting results.
But when I think about it and look back, I don't see it used too often in one frame on the NES. Sure, it gets used a lot to have things like status bars and to divide backgrounds to have elements scroll at different speeds, but I can't think of any situations where it was used for the cool warping effects I've seen on later hardware. This strikes me as a little odd, because really, it is such a fundamentally simple effect that I would think the NES should be able to use it more frequently. I mean, even to draw a boring stationary background, the system still has to change where the image is drawn from for each scanline anyway, or else you'd have 224 identical scalines.
So why did we never see the NES make an underwater level have a wavy distortion effect by moving that draw point a little in the X value every line? Was there actually some kind of limit that kept the system from changing the starting point too many times? Is this just too computationally intense to be done in the H blank and still be able to calculate the rest of the game's code in a single frame? And why was the Game Boy able to do this for every horizontal line when it was in many ways inferior hardware? (Granted doing the whole screen meant fewer lines, but still.) Or was it capable, but just that nobody thought to do it for whatever reason?


Top
 Profile  
 
PostPosted: Sun Apr 07, 2019 8:04 am 
Offline
User avatar

Joined: Fri Sep 30, 2016 8:57 pm
Posts: 110
recca comes to mind....

you can see it in this vid about 3 minutes in:

https://www.youtube.com/watch?v=nfY79-3AdGY


Top
 Profile  
 
PostPosted: Sun Apr 07, 2019 8:18 am 
Offline
Formerly glutock
User avatar

Joined: Sat Aug 15, 2015 3:42 pm
Posts: 163
Location: France
210 times per frame here : https://www.youtube.com/watch?v=CsAkL2yE4dI

_________________
My first game : Twin Dragons available at Broke Studio.


Top
 Profile  
 
PostPosted: Sun Apr 07, 2019 8:24 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21505
Location: NE Indiana, USA (NTSC)
The limit to how much line scrolling you can do on the NES is CPU time. Changing the scroll on consecutive lines takes essentially the CPU's full attention. It's not like the Genesis, whose VDP could read a scroll position table from VRAM, or the Super NES, whose CPU had a DMA controller that could rewrite the scroll registers every scanline out of a table in RAM. This is why you most often see it done for only part of the screen, as in Slalom or Rad Racer.

_________________
Pin Eight | Twitter | GitHub | Patreon


Top
 Profile  
 
PostPosted: Sun Apr 07, 2019 12:17 pm 
Offline
User avatar

Joined: Fri Sep 11, 2015 10:39 am
Posts: 163
toggle switch wrote:
recca comes to mind....

you can see it in this vid about 3 minutes in:

https://www.youtube.com/watch?v=nfY79-3AdGY


Image

tepples wrote:
The limit to how much line scrolling you can do on the NES is CPU time. Changing the scroll on consecutive lines takes essentially the CPU's full attention. It's not like the Genesis, whose VDP could read a scroll position table from VRAM, or the Super NES, whose CPU had a DMA controller that could rewrite the scroll registers every scanline out of a table in RAM. This is why you most often see it done for only part of the screen, as in Slalom or Rad Racer.


That would make sense why it wasn't seen in game too often. Of course, that relegates questions like "why they didn't use it in X situation" like the warp effect in Dragon Warrior (where it wasn't during game play and thus could be done without impacting anything) comes down to "they just didn't think to use it," which is both disappointing and hard to really confirm.

But at the same time, the two example shown above managed to pull off that effect across most of the screen while in the middle of gameplay, so it seems like it should be possible, just not optimal.


Top
 Profile  
 
PostPosted: Sun Apr 07, 2019 1:02 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7526
Location: Canada
Marscaleb wrote:
Of course, that relegates questions like "why they didn't use it in X situation" like the warp effect in Dragon Warrior (where it wasn't during game play and thus could be done without impacting anything) comes down to "they just didn't think to use it," which is both disappointing and hard to really confirm.

I don't think that's fair to assume, at all.

It's not trivial to implement, and 1000x less so when you take 30 years of reverse engineering and emulation tools off the table. "Didn't think to use it" is extremely dismissive of the amount of work required. Even if it's a small amount of code, it's a lot of work to tune to get working properly. That's all assuming you even know how to do it to begin with.

...and that's assuming they even have practical hardware for it. Dragon Warrior (1989) didn't have an IRQ (MMC1), which makes the problem a lot harder than with later hardware. Recca (1992) has an MMC3, and it's literally a different generation of machine.

Even if you have the knowledge, tools, skills, and hardware at your disposal, it still takes time to design a situation that uses it. It takes ROM space to implement. It takes accompanying graphics, etc. to use it, and most of all it takes up developer's time, which was always a limited resource. The question you must ask as a commercial game developer is not "Can I do a wavy background?" but "Is there something else that is worth more than a wavy background?" It's a question of whether you think this is a good use of resources. Every thing you put into a game takes away a multitude of other potentials.


Top
 Profile  
 
PostPosted: Sun Apr 07, 2019 3:43 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 4191
Recca actually waits at least 4 scanlines between each scroll change, so it doesn't use all that much CPU, and it also does not need to be accurately timed because of how chaotic the background is.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 12:03 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7720
Location: Chexbres, VD, Switzerland
Quote:
By the way, does this technique have a name?

Isn't if called wavy effect or something like that ?


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 2:38 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 896
Location: Denmark (PAL)
Typically I just see effects that are created via code timed to specific scanlines referred to as, well, "scanline effects".


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 2:44 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 7526
Location: Canada
"raster effect" is also common


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 3:41 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 896
Location: Denmark (PAL)
Kind of misleading though, considering raster typically refers to pixel/bitmap manipulation?


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 5:49 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11375
Location: Rio de Janeiro - Brazil
The word "raster" refers to the scanning nature of CRT displays, which draws pictures one line at a time, and these effects are achieved by manipulating rendering parameters each line, so I think that "raster effect" is a very appropriate name.


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 6:03 am 
Offline
Formerly WheelInventor
User avatar

Joined: Thu Apr 14, 2016 2:55 am
Posts: 2024
Location: Gothenburg, Sweden
I don't think it is quite that simple. The word has undergone several semantic shifts. If we skip the latin roots, and focus on its modern use, it is simply from the german word raster (which means screen). It has then been associated with scanlines. But in recent modern usage, "raster" is mostly used to differentiate "raster graphics" from "vector graphics", which in todays' tools is just the difference between pixel bitmaps and algorithmic drawing. So if you talk to someone working with digital graphics today, they do not associate the word with scanline technology, but with bitmaps. While technically correct to call it "raster affects", sumez is right that this would cause confusion.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 6:23 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11375
Location: Rio de Janeiro - Brazil
But raster graphics get that name because they are composed of discrete units arranged as lines, it's the exact same meaning as in a raster display, I don't see any conflicts there. If a person can only think of the word "raster" as a distinction from "vector", then that's their problem, "raster effects" are effects achieved by manipulating the data sent to a raster display, and it's OK if not every graphic designer that deals with raster and vector graphics knows that, specially if they're not into retro gaming.


Top
 Profile  
 
PostPosted: Mon Apr 08, 2019 7:03 am 
Offline
Formerly WheelInventor
User avatar

Joined: Thu Apr 14, 2016 2:55 am
Posts: 2024
Location: Gothenburg, Sweden
You're right. In a technical sense, this is where it comes from. But the use of "raster" as a distinction from vector graphics in graphics editors like illustrator, indesign and photoshop would far more common than the use within small retro computing scenes. It's not an argument why one should be preferred over the other, just an explanation to why there's risk of confusion.

"raster effects" in an illustrator context would refer to effects only available if you rasterize (ie bitmap convert) your objects, such as photoshop filters and the like. So here, we're talking about per pixel manipulation, rather than per line. So it wouldn't surprise me if "raster effects" would give people the idea that it's about per pixel manipulation... maybe software generated tiles or sprite masking in a NES context. It's not crystal clear without further research. So, if you're writing a tutorial i think it's best to include a short and sweet explanation if you use the term "raster effect", and an author of a wiki article using the term may want to link it to an article on the subject of raster/scanline effects themselves.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  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