+Gemintronic Posted October 11, 2012 Share Posted October 11, 2012 By some happenstance I went from playing WonderBoy on the SG-1000 and then Super Cobra on the Coleco. I noticed Super Cobra did not do that chunky tile-by-tile scrolling. It actually seemed to smoothly scroll horizontally. How do Coleco games produce the smooth scrolling effect? Which games do it? Quote Link to comment Share on other sites More sharing options...
ColecoDan Posted October 11, 2012 Share Posted October 11, 2012 One of the homebrew guys would be better answering the technical aspects. I believe it has mostly been done by saving all the different screen changes that the scrolling would need. Most of the smoother games are homebrew games and WonderBoy is supposedly coming out this year or next year from Pixelboy so you can compare between the two versions since you played the SG-1000. I believe it is a port from that version. Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted October 11, 2012 Share Posted October 11, 2012 As Dan said, it's mostly done by updating static tiles in VRAM to "fake" a scrolling effect. Let's say you want to scroll an 8x8 piece of background in increments of 2 pixels horizontally. You would define that piece of background in a tile, then you would use two other (different) tiles to draw that same piece shifted 2 pixels to the right (or left): One tile will contain 25% of the piece, and the other tile will contain 75% of the same piece. Then you would use two more tiles to do another shift: One tile will contain 50% of the piece, and the other tile will contain the other 50%. Add two more tiles for another shift (One tile will contain 75% of the piece, and the other tile will contain the remaining 25%) and you have all the tiles you need to create your scrolling effect, you just need to display the appropriate tiles at the appropriate time to create the illusion of scrolling. As you can imagine, managing a lot of tiles this way can get pretty complicated, and given that the number of available tiles in VRAM is limited, it's not something you can do easely however you want. Scrolling is much easier on later hardware like the NES, because the hardware offers the possibility of displaying the entire screen with an offset, so you don't need to predefine series of tiles as explained above. 2 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted October 11, 2012 Share Posted October 11, 2012 For the more technical involved, a small discussion of how I did the scroll in Princess Quest. In the highest resolution VDP mode (mode 2) the screen as you see is composed of 8x8 tiles, there is a frame of 32 columns by 24 rows, each eight rows can have 256 different tiles. In order to do smooth scroll, you should define tiles shifted by pixel AND combined with following tile (by example, 6 pixels of tile plus 2 pixels of following tile) For fast update you change the screen (32x20 tile indexes or so) each two frames so you leave one frame for internal game logic (no way to do it updating pixels, that would be 4K-6K bytes, and VDP is very slow) Need to say that VDP limits colors roughly and you should play tricks to combine different colors, like leaving at least 8 pixels space between tiles of different color. If your game uses less graphics, you can redefine a small number of tiles continuosly. And of course I saved some "untouched" tiles to draw letters for score, record, energy and lifes. 3 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.