Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to obtain no blank / flickering screens in between pages of information.  (Read 4935 times)

0 Members and 1 Guest are viewing this topic.

robertframpton

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8

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.
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo

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.
Logged

robertframpton

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 8

  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.




 
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo

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.
Logged

Sidewinder

  • Forum Mod
  • A600
  • *****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • http://www.liquido2.com/

@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.
Logged
- Sidewinder

Ionise

  • Guest

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
Logged
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022