Text from Simple "Nine Sprites" Demo
Description: | Text scroller |
Text: | THE DEMO "KRESTAGE 3" SHOWED THAT IT IS POSSIBLE TO DISPLAY 9 SPRITES ON ONE RASTER LINE EVERY OTHER LINE. HOW DOES THAT WORK? ON THE CURRENT RASTER LINE, NEAR THE POSITION OF THE RIGHT BORDER, THE VIC CHIP STARTS FETCHING THE SPRITE DATA IT HAS TO DISPLAY ON THE NEXT RASTER LINE (THE BIT PATTERNS, THAT IS. THE VIC REGISTERS DETERMINE WHERE ON A LINE THE PATTERNS ARE DISPLAYED AND IN WHAT COLORS). IF YOU CHANGE THE POSITION OF SPRITE 0 TO THE FAR RIGHT AFTER IT HAS ALREADY BEEN DISPLAYED, THE SECOND LINE OF SPRITE DATA WILL BE FETCHED BEFORE THE VIDEO BEAM REACHES THE NEW SPRITE POSITION, BUT SINCE THE VIDEO BEAM HASNT JUMPED YET TO THE NEXT RASTER LINE, THIS SECOND "SPRITE LINE" IS STILL DISPLAYED ON THE CURRENT RASTER LINE. HOWEVER, ON THE NEXT RASTER LINE THERE IS NO SPRITE DATA LEFT TO SHOW AND A GAP APPEARS IN SPRITE 0. BY MOVING SPRITE 0 BACK AND FORTH YOU APPARENTLY HAVE ONE SPRITE EXTRA EVERY OTHER RASTER LINE. THE OTHER 7 SPRITES CAN BE SHOWN IN EVERY RASTER LINE. I THOUGHT IT WOULD BE NICE TO CHOOSE WHERE THE GAP APPEARS ON A GIVEN RASTER LINE. FOR EXAMPLE, AFTER SPRITE 0 AND 1 HAVE BEEN DISPLAYED, SPRITE 0 CAN BE MOVED TO THE FAR RIGHT AND SPRITE 1 TO THE ORIGINAL POSITION OF SPRITE 0 (POSITION 0). IF THE SPRITE IMAGE POINTER OF SPRITE 1 IS CHANGED AS WELL (TO IMAGE 0), NO GAP IS VISIBLE IN THE NEXT RASTER LINE IN POSITION 0, BUT IN POSITION 1. SO I CAN CHOOSE WHERE THE GAP APPEARS. THERE IS A PROBLEM FOR POSITIONS 6 AND 7, BECAUSE THEY ARE TOO FAR TO THE RIGHT OF THE SCREEN TO MOVE THEM AFTER THEY HAVE BEEN DISPLAYED. THIS CAN BE SOLVED BY JUGGLING WITH 3 SPRITES.... YOU CAN SEE THAT THE 9TH SPRITE HAS ONE MORE LINE THAN IN KRESTAGE 3. THIS IS DONE BY TURNING Y-EXPANSION ON FOR SPRITE 0 ON LINE 20. THIS GIVES IT A 22ND LINE THAT IS MOVED TO THE 9TH SPRITE. I CAN CHANGE THE SPRITE IMAGES, COLORS, AND GAP POSITIONS INDEPENDENTLY. HERE THE GAP POSITIONS ARE CHANGED TO CREATE A SORT OF SIMPLE WAVE. THIS SMALL PROGRAM ALREADY TOOK ME QUITE SOME TIME TO FINISH. I START TO REALIZE HOW DIFFICULT IT IS TO DEVELOP A COMPLETE C64 DEMO!!! |
<-- Back
|
|
|