| www.retrosoftware.co.uk http://www.retrosoftware.co.uk/forum/ |
|
| The dreaded sprite flicker http://www.retrosoftware.co.uk/forum/viewtopic.php?f=73&t=116 |
Page 1 of 1 |
| Author: | DaveF [ Wed Jun 18, 2008 9:06 am ] |
| Post subject: | The dreaded sprite flicker |
Hello Anyone have any nice tips for preventing the dreaded sprite flicker? 'Forcing' to two frames? Alternate update on frames? (eg update player one frame, enemies the next, and so on) I seem to have forgot how little time you actually have on the BBC to do your thing |
|
| Author: | SteveO [ Wed Jun 18, 2008 9:37 am ] |
| Post subject: | Re: The dreaded sprite flicker |
Can't find the article now but there was some discussion on STH forums about best time and way to do your graphics for least flicker. i.e. plotting by Y pos on screen. So plot the ones near the top first. Also perhaps setting a timer to trigger plotting at the top when the raster has just started slightly below top might give you even more time. |
|
| Author: | FrancisL [ Wed Jun 18, 2008 2:57 pm ] |
| Post subject: | Re: The dreaded sprite flicker |
I don't know how feasible it is to do it on a BBC B, but on a Master you can double buffer the screens to reduce the flicker. In other words, do your sprite plotting on a logical (non-displayed) screen and then swap it with the physical (displayed) one. Kind regards, Francis. |
|
| Author: | SteveO [ Wed Jun 18, 2008 3:04 pm ] |
| Post subject: | Re: The dreaded sprite flicker |
Not possible on a standard beeb I think, as (may stand corrected here) but the screen must always end at address $7FFF, as that's how the hardware works to start wrapping around to the start of the screen again. So even if you used a 10K (or less) screen you couldn't make it swap between one that ends at &7FFF and one that doesn't. On the Master and Beebs with shadow screen ram the circuits are designed so that when swapped in they inhabit the right part of memory and can never co-exist with the normal screen ram in main ram at the same time. |
|
| Author: | DaveF [ Wed Jun 18, 2008 3:07 pm ] |
| Post subject: | Re: The dreaded sprite flicker |
Hmm sadly not applicable on the BBC, I can barely afford the memory for one framebuffer, let alone two |
|
| Author: | RichTW [ Wed Jun 18, 2008 3:20 pm ] |
| Post subject: | Re: The dreaded sprite flicker |
Well... it's perfectly possible to do double-buffering, but of course the proviso is that you don't do any hardware scrolling. Onslaught (the game I never finished, over on Lost & Found in STH) uses two 8k Mode 5 screen buffers - one at &4000 and one at &6000 - to allow me to do a software scroll of a window and move a large number of sprites and particles with no flicker. There are other games which also do this, e.g. Repton Infinity, Bonecruncher, Predator. All these games redraw their entire playing area each time (to account for the new scrolled position) which is an easier approach than trying to keep track of where the old sprites were two frames ago and erasing only them, but it's at the expense of speed - which is why the frame rate of these software scrolled games is normally not as good as their hardware-scrolled counterparts! |
|
| Author: | SteveO [ Wed Jun 18, 2008 3:22 pm ] |
| Post subject: | Re: The dreaded sprite flicker |
Ahh, stand corrected |
|
| Author: | DaveF [ Wed Jun 18, 2008 3:26 pm ] |
| Post subject: | Re: The dreaded sprite flicker |
Sorvad: Cheers for that STH tip, I found it and got rid of my flicker. I used the method of IRQ timers to set my 'vsync' just after I'd drawn the last bit of my game area, rather than at the end of the total frame. Thanks really should go to Rich of course, since he posted the article! Linkage here |
|
| Author: | FrancisL [ Wed Jun 18, 2008 3:30 pm ] |
| Post subject: | Re: The dreaded sprite flicker |
Rather than linking code like this to various posts they should really be added to the "Sample Code" section of this site for easier reference. Kind regards, Francis. |
|
| Page 1 of 1 | All times are UTC [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|