Ultimate Amiga

Please login or register.

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

Author Topic: BOB flickering problem  (Read 2696 times)

0 Members and 1 Guest are viewing this topic.

wojt_gl

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
  • Generic Amiga User
BOB flickering problem
« on: March 16, 2013, 11:39:48 PM »

Hello all!
I have a problem with my AMOS program and flickering bobs...
I am doing easiest example of double buffer screen (from Creator User Guide book) and I see that there is annoying flickering of bob on upper half of screen.
I attached a sample code (with gfx), where you can observe this strange behavior. I am just changing the x location of bob decreasing it by 2, and the y location is mouse pointer location.
As You can see there is this flickering effect on upper part of screen.

Why it appears, and how to prevent of this?

Thanks in advance for Your help!
Logged
- A500 + 8MB + 0,5MB + HxC
- A1200 + CF +Mtec 8mb/28MHz
- C64 + sd2iec + 1541 II
- (C116, C16, NES, PEGASUS, Atari, Atari 2600, Sega...)

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: BOB flickering problem
« Reply #1 on: March 17, 2013, 10:37:49 AM »

Hi wojt_gl

Your problem is caused by setting Screen 0 up before you load the IFF file.

When AMOS starts up, any reference to current screen refers to the default screen 0.
So your double-buffering, autoback and updating are applied to that default screen.
When you then load an IFF file into screen 0 in line 2, you're replacing all the stuff you just set up in line 1.

Change the start to swap those lines around:

Load Iff "gfx.mountains.iff",0
Double Buffer : Autoback 2 : Update Off


and problem solved.

(And don't forget to lose the Cls 0 in that second line or you'll get a nice blank grey screen instead.  ;) )
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."

wojt_gl

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 10
  • Generic Amiga User
Re: BOB flickering problem
« Reply #2 on: March 17, 2013, 12:42:22 PM »

Hello bruceuncle!
Thanks a loooot. The solution was really simple and I do not know why I didnt found it by myself :)

Very helpful!

Logged
- A500 + 8MB + 0,5MB + HxC
- A1200 + CF +Mtec 8mb/28MHz
- C64 + sd2iec + 1541 II
- (C116, C16, NES, PEGASUS, Atari, Atari 2600, Sega...)
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022