Welcome Guest. Please Login or Register. Apr 6th, 2018, 12:01am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
Sprites and Refresh
« Thread started on: Nov 24th, 2013, 5:37pm »
I have adapted a neat little program from the Acorn days which produces one of those scrolling day and night displays which overlays the pattern of night (and, obviously day) on a map of the world. It works very nicely and as I am using to demonstrate a concept, day and night move in response to cursor keys rather than the clock. Fine. Everything is rock steady, because I am using *REFRESH OFF and a *REFRESH after drawing the new pattern. However the sun is indicated with GCOL3,whatever, which means that its colour varies as it passes over land or sea. I thought it would be a nice idea to use a sprite for the sun. Fine, everything works - except that now the shadow of night and the text on the screen flickers horribly. Remove the references to sprites and back to rock steady. Initialise sprites and flicker. Am I doing something wrong or is this an undocumented feature of the sprite library?
Am I doing something wrong or is this an undocumented feature of the sprite library?
I don't think you can mix the use of sprites with *REFRESH, as these are alternative ways of making animation 'glitch free'. I would recommend that you choose one or other technique, and then stick with it for the entire program.
For example if you use *REFRESH don't you need to redraw the background each time the sun moves anyway? Even if you don't need to redraw the entire background you could save and then restore just the bit covered by the sun (e.g. using *GSAVE/*DISPLAY or RECTANGLE .. TO).