Ultimate Amiga

Network Boards => AMOS Programming Environment => AMOS Factory => AMOS BASIC => Topic started by: robertframpton on March 31, 2006, 02:17:16 PM

Title: How to obtain no blank / flickering screens in between pages of information.
Post by: robertframpton on March 31, 2006, 02:17:16 PM
I have written a large program in AMOS. I have designed it so that you do not see the display being drawn. However in between diferent screens whilst navigating whithin the program I cannot design it so that a blank screen is not visible inbetween different screens.

  My intention is for the whole program to be displayed seamlessly and only the graphics that make up the the program being showed, with no flickering/ black screens in between.

  I have experimented with screenswap, screen copy and the logic and physic commands, but with out any sucess.

  The general pattern to my code for each screen is this:-
 
  hide the display,
  unpack a picture,
  onscreen drawing operations including text output with grwriting,
  show the resulting screen.
 
  Any help with this would be much appreciated.
Title: Re: How to obtain no blank / flickering screens in between pages of information.
Post by: SamuraiCrow on March 31, 2006, 07:11:36 PM
Try turning off the automatic double buffering with the autoback command.  Then wait until after you unpack the picture onto the logical screen before you swap screens.

I can't guarentee that this technique will work but the autoback is probably the problem you have been having so far.
Title: Re: How to obtain no blank / flickering screens in between pages of information.
Post by: robertframpton on August 11, 2007, 04:33:30 PM
  I have tried what you said, but without any luck. This resulted in being able to see the display being drawn.

Please could you tell me:-

 What screens need to be opened. And how they are managed.
 To which screen I should unpack to. I have tried omitting the screen number, but this messes up the colours.
 What code is required prior to  my unpacking pictures, graphic and text operations.
 The instructions after the drawing operatioins in order for no visible drawing or flickering in between displaying static screens.
  How best to replace the current screen with the new one, taking into account that each background has a different pallete, showing no screen in between.
 
Please could you advise me of the fastest, and best way to do this.

Thanks.




 
Title: Re: How to obtain no blank / flickering screens in between pages of information.
Post by: SamuraiCrow on August 11, 2007, 05:27:39 PM
It seems that Amos' double-buffer feature doesn't adequately account for different palettes so I guess the only way to do it properly would be with the Screen Hide and Screen Show commands using variables to hold which screen is the back and which is the front.  I'll have to do some experimenting and then get back to you.
Title: Re: How to obtain no blank / flickering screens in between pages of information.
Post by: Sidewinder on August 11, 2007, 11:43:09 PM
@robertframpton

The typical loop for a double buffered display is:

Code: [Select]
Double Buffer
Autoback 0

Do
   ' Clear the screen or update damaged sections here

   ' Redraw the background here
   ' Redraw any foreground graphics here

   Screen Swap
   Wait Vbl
Loop

If you don't actually issue the Double Buffer command first, then no buffers are set up and the screen will flicker.  Also, if you're only going to be drawing foreground graphics (like bobs or drawing commands) during your main loop, you will need to draw the background on both the front and the back buffers before you start using them or the screen will also flicker.
Title: Re: How to obtain no blank / flickering screens in between pages of information.
Post by: Ionise on September 25, 2008, 10:53:39 AM
This might sound obvious but are you (WAIT)ing (V)ertical (B)(L)ank?

You could try offsetting the screen outside of the physical screen area also whilst any drawing is taking place then flick it back