If you are using double buffering, you must make sure that there is a genuine connection between the logical and physical screens. To achieve smooth graphics, there must be a sensible progression from screen to screen, otherwise flickering distortions will be displayed.
When scrolling the playing area of a computer game, it is often possible to ensure that screens are already in step, so BOB CLEAR and BOB DRAW can be used without any problems. In other situations, you may need to make radical changes from screen to screen, so ensure that these are made both copies of the current screen.
The Autoback command
The standard Bob routines only work if the logical and physical screens are in perfect harmony.
The instant that text or graphics are drawn, or the SCREEN COPY command is used, the two
screens fall out of step with one another, ruining any smooth effects. In the case of SCREEN
COPY, you must take control over the system with the BOB DRAW and BOB CLEAR
commands, but when using standard graphics commands, the situation is much easier.
AMOS Professional includes a powerful feature that automatically synchronises all text and graphics operations with all Bob updates. This means that once DOUBLE BUFFER is activated, graphics and text can be displayed as normal. This is the principle of the AUTOBACK system.
AUTOBACK
instruction: set mode for graphics operations on double buffered screen
Autoback mode
There are three AUTOBACK modes, and you can toggle between them by setting the mode values as follows:
X> Autoback 0
Manual mode. This mode deactivates the AUTOBACK system completely, so that graphics are drawn directly on the logical screen, for maximum speed. It is recommended for use with the BOB DRAW and BOB CLEAR commands.
AUTOBACK 0 is useful when large amounts of graphics are drawn on screens being switched manually with SCREEN SWAP, because it is much faster than the standard system. But remember that you must take responsibility for synchronising between the logical and physical screens.
X> Autoback 1
Semi-automatic. In mode 1, AUTOBACK performs all graphical operations on both the logical and physical screens. Although Bob updates are not taken into account, this is an ideal mode for displaying hi-score tables and control panels. So as long as your Bobs are kept clear of any new graphics, this mode is perfect.
X> Autoback 2