4 ms·
Well done Itay on such extensive and graphical explanation of scrolling. It is interesting how wrong picture of scrolling I had before.
by NiceWayToDoIT 6y ago
Well done Itay on such extensive and graphical explanation of scrolling.
It is interesting how wrong picture of scrolling I had before.
- makapuf 6y agoI have a nitpick however on one technical explanation: it is said that scrolling is sometimes avoided because it was expensive on old hardware. On all consoles, the background had an x/y scroll offset which allowed to scroll it with no effort. What cost in moving the camera was changing the sprites to be dragged while the camera moved to give the illusion they were not moving relatively to it.
- tym0 6y agoYou're correct for console that handled that at the hardware level. I understood this section as referring to computer games, which didn't do that on the hardware.
- tenebrisalietum 6y agoIt depends. Cycles are still needed to copy new data into sprite and VRAM which typically has to be done during vertical blank, esp. on older consoles. 16-bit platforms like SNES and Genesis/MegaDrive had a large enough VRAM to hold a background with enough area that you might be able to get away with reloading data into VRAM "between rooms". NES has enough VRAM for 2 screens - either horizontal or vertical (it could do 4 screens if the catridge had extra VRAM on board which was rare) and VRAM can't be updated except during vblank. The game engine has to spend time copying new data ahead of the visible screen, and also must spend some cycles each frame letting a DMA process copy 256 bytes of data describing sprite positions to the video chip's object RAM. Not as bad as the Commodore 64 where the scroll registers shift only up to 8 pixels and an engine has to recopy potentially a full 1k of screen and 1k of color RAM to move things (barring things like VSP which could corrupt RAM on certain C64's) - or the Atari 2600 that had no video RAM at all and required programming the video chip per scanline right before the TV is drawing it.