
Conversely, the effect only works where you don't draw that frame - so if your game has e.g. black borders), but if the view moves more than the width of the border you're out of luck. It can be mitigated by drawing around your objects (e.g. You can't draw anything that moves without the fade effect "catching" it.
very simple particles look much more complicated than they really are. Cross-fading out from a scene just happens "free". You can draw whatever you want really and the effect essentially "just works" as a replacement for a cls(). Of course, as soon as I write about it the old subconscious starts working away and it takes 5 minutes to implement just that - a reverse N pattern as it turns out. I'm concerned it might cost too much more in performance/tokens for too little visual improvement. Nevertheless, I keep meaning to try a "Z" pattern i.e. Since I found using poke4 to work on 8 pixels at a time was fastest (not surprising really) dithering horizontally is limited and isn't in the demo. A random value flr(rnd(4)) works quite well too, but is messier looking. Using the order 0,2,1,3 for the scanlines does some rough dithering to make the effect look a bit more uniform. I initially tried fading in quarter strips top to bottom, but the tearing on bigger objects like planets looked pretty bad. It takes 4 frames to fade the whole screen one step. Effectively a quarter of the screen is faded at a time. It's pretty expensive to do the whole screen (IIRC about 90% of performance at 60fps) so I've set it up to do every fourth scan line, starting from a different point each frame. In this demo I process the pixels already in screen memory so that the screen is faded by a step, then draw fresh stars on top of that. but that fades everything including anything drawn that frame. You can use a similar mapping with the pal(x,1) function to e.g. This works by mapping the colour of every pixel on the screen to another colour that tends to a target e.g. It does mean that the same stars go past constantly, but otherwise I was processing a lot of particles that don't get seen very often (not aiming for realism here). Then I clamp the resulting x,y values to the screen with the modulus operator so they're always visible (%128). In game, I feed in the player's position. In this demo I use a couple of sin functions to give them some movement combined with a divide by the z coord for a bit of parallax.
The stars are just simple particles that have x,y,z coordinates. Demo showing the combination of the stars and fade effect I used in PICO Space.