CannibalCat Posted July 10, 2016 Share Posted July 10, 2016 I know the standard technique of shifting char tiles for software vert and horiz scrolling on the CV, but how did they get around this and make it seem so smooth on games such as Defender, Nova Blast, Victory, etc? Thanks, Rich 1 Quote Link to comment Share on other sites More sharing options...
PkK Posted July 10, 2016 Share Posted July 10, 2016 I don't know, but I assume they did it the same as I did for my games in the Search for the Stolen Crown Jewels series: Only a few rows are scrolled (for me, depending on the game uo to 4). Nova Blast only needs to scroll the cliffs at the bottom row, and 2 or 3 rows for the islands. SCJ games have two rows on the bottom and up to 2 rows of clouds in the sky. All other movement is done via sprites. For those rows, you stole each tile multiple times, depending on how smooth the scrolling will be, you have 4 or 8 shifted versions shifted by 2 or 1 pixels each. Then you quickly overwrite the VRAM data for the 3 or 4 rows in your game main loop. You only need to write 32 bytes of VRAM per row. Philipp 1 Quote Link to comment Share on other sites More sharing options...
PkK Posted July 10, 2016 Share Posted July 10, 2016 One advantage of this technique vs. hardware scrolling available on other systems is that the different rows can scroll at different speeds. In the SCJ games, I used that to move the clouds at different speed from the ground. In Nova Blast, the islands move at a different speed from the cliffs at the bottom of the screen. Philipp 1 Quote Link to comment Share on other sites More sharing options...
CannibalCat Posted July 10, 2016 Author Share Posted July 10, 2016 I don't know, but I assume they did it the same as I did for my games in the Search for the Stolen Crown Jewels series: Only a few rows are scrolled (for me, depending on the game uo to 4). Nova Blast only needs to scroll the cliffs at the bottom row, and 2 or 3 rows for the islands. SCJ games have two rows on the bottom and up to 2 rows of clouds in the sky. All other movement is done via sprites. For those rows, you stole each tile multiple times, depending on how smooth the scrolling will be, you have 4 or 8 shifted versions shifted by 2 or 1 pixels each. Then you quickly overwrite the VRAM data for the 3 or 4 rows in your game main loop. You only need to write 32 bytes of VRAM per row. Philipp Thanks for the insight, I figured that was what Nova Blast was doing... Defender perplexes me a bit more but I guess it's more of the same. Quote Link to comment Share on other sites More sharing options...
artrag Posted July 10, 2016 Share Posted July 10, 2016 (edited) Let me show off a bit :-) Edited July 10, 2016 by artrag 1 Quote Link to comment Share on other sites More sharing options...
CannibalCat Posted July 10, 2016 Author Share Posted July 10, 2016 Let me show off a bit :-) Yeah, how! Quote Link to comment Share on other sites More sharing options...
youki Posted July 10, 2016 Share Posted July 10, 2016 For battle of hoth , i shift the bits of patterns directly in VRAM. 1 Quote Link to comment Share on other sites More sharing options...
CannibalCat Posted July 10, 2016 Author Share Posted July 10, 2016 For battle of hoth , i shift the bits of patterns directly in VRAM. Exactly what I was looking for... any code samples/snippets you could share? Quote Link to comment Share on other sites More sharing options...
Kiwi Posted July 11, 2016 Share Posted July 11, 2016 Here's the tileset for my game A Sparrow Goes Flapping. I have a copy of the tree as is, and a shift over by 4 version. Same for the grass and the tree top. The small tree is have 8 copy of it. The trick is to use for if(frame==0) then screen(name_table2,name_table1); it to have to show name table at 0x1c00, and have 0x1800 editable with the getput library. The grass and the top is draw in this frame. void MoveGrass2(void) { if(grass==0){put_at(0,16,Buffer2,32);put_at(0,0,Buffer2+66,32);} if(grass==1){put_at(0,16,Buffer2+33,32);put_at(0,0,Buffer2+99,32);} if(grass==2){put_at(0,16,Buffer2+1,32);put_at(0,0,Buffer2+67,32);} if(grass==3){put_at(0,16,Buffer2+34,32);put_at(0,0,Buffer2+100,32);grass=255;} grass++; } Some of the graphic is decompressed into RAM so buffer2 holds the decompressed version of the tables. And the small tree is also drawn on this frame. void DrawSmTree(void) { put_frame(bgtree0+(smtreep*12),smtree,5,2,6);put_frame(bgtree0+(smtreep*12),smtree+18,5,2,6); } put_frame is one of my most favorite Coleco BIOS function. Draw score routine is also called on this frame too. Then when delay(1) and frame++ is hit, then it is frame 1, DrawTreeMachine(); put_frame won't draw the tiles if the tiles' x position is more than 32. frame 2, and frame 3 draw the other 2 trees. Frame 4, now hit screen(name_table1,name_table2); to display the finish picture, and then draw the small background trees and the top and the grass. Frame 5-7 draw the shifted version of the tree. The tree also serve to erase the background a little instead of doing a 512 tile write to erase the entire picture. For example, const byte Tree1[] = { 228,236,244,252,32, 229,237,245,253,32, 230,238,246,254,32, 228,236,244,252,32, 229,237,245,253,32, 230,238,246,254,32, 228,236,244,252,32, 229,237,245,253,32, 230,238,246,254,32, 228,236,244,252,32, 229,237,245,253,32, 230,238,246,254,32, 228,236,244,252,32, 229,237,245,253,32, 230,238,246,254,32, }; 32 will press the black tiles erasing the trail produced by the tree. The cave part is a little more complicated. I did an experiment with a bunch of scrolling trees with a cool parallax scrolling. I posted the source code to go with it. smoothscroll2.zip 4 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.