English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 13 August 2021, 06:53   #1
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
Help with flickering and paste bob blit but disappear

AMOS issue with flickering. I do not understand. I copied the code exactly as how it is for the engine of my game and I am having issue with buffering. If I use paste bob the refresh or buffer causes it to disappear. If I use bob it stays there but if I put too many of them in the screen they flicker something fierce. This did not happen before in my engine side, but it is happening in the editor side. Any advice how to solve this issue? I personally prefer to use paste bob instead of bob. With paste bob I can draw infinite amount, with bob I am limited to 254 max. As soon as I use paste bob it disappears from the screen due to buffer or refresh or not switching between screens or I do not know what. And if I use the limited 254 max bob...the more is blittered the more it flickers.

Any help to solve what seem to be n00b a problem?
xboxown is offline  
Old 13 August 2021, 20:49   #2
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
No idea, are you double buffering?

or turn off Bob update
Paste bob
Bob update

Sorry not done anything like that for ages, but I like your idea and always meant to try something like this, I once did something similar with Paste icon and the results were pretty good but I never completed it.

I mean Paste bob should not create any flicker because once it's drawn its part of the Bittmap it can't be moved etc.

Last edited by Retro1234; 13 August 2021 at 20:56.
Retro1234 is offline  
Old 13 August 2021, 22:19   #3
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
Quote:
Originally Posted by Retro1234 View Post
No idea, are you double buffering?

or turn off Bob update
Paste bob
Bob update

Sorry not done anything like that for ages, but I like your idea and always meant to try something like this, I once did something similar with Paste icon and the results were pretty good but I never completed it.

I mean Paste bob should not create any flicker because once it's drawn its part of the Bittmap it can't be moved etc.

No that does not work. When I place screen swap inside the loop...it swaps in one second where the image is not there and swaps again where the image appears causing flickers. In additional to flickers when I move the square around...sometimes ghosting appears during swapping. I need to know what to do to fix it.
xboxown is offline  
Old 13 August 2021, 23:28   #4
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
ok if I understand what you are saying yes you are double buffering so your have to paste to both screens or use the correct Autoback method but you won't be able to use this for a replacement to the Bob command unless you have come up with a routine to restore the background, unless your using a tiled map or a blank background I guess your out of luck.
Retro1234 is offline  
Old 14 August 2021, 12:18   #5
adrazar
Registered User
 
Join Date: Feb 2017
Location: Oslo
Posts: 90
Quote:
Originally Posted by xboxown View Post
If I use bob it stays there but if I put too many of them in the screen they flicker something fierce.
This only happens when you are still in single buffered mode. Maybe you have multiple screens in the editor? If so you need to make sure the flickering screen is selected before you issue the Double Buffer instruction.

It is just inconvenient to manage bobs manually with Paste Bob if you have a double buffered screen, bobs are much better suited for that.
I suppose the 254 bobs maximum could be a limitiation if you try to assign an inidividual Bob to each object on the entire map, but there is a good option available if you need more: only assign a Bob to each visible object on the map. (I kind of want to see if I can write a neat little system for this today, maybe I'll post the result here if it turns out well )
adrazar is offline  
Old 14 August 2021, 17:34   #6
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
Quote:
Originally Posted by adrazar View Post
This only happens when you are still in single buffered mode. Maybe you have multiple screens in the editor? If so you need to make sure the flickering screen is selected before you issue the Double Buffer instruction.

It is just inconvenient to manage bobs manually with Paste Bob if you have a double buffered screen, bobs are much better suited for that.
I suppose the 254 bobs maximum could be a limitiation if you try to assign an inidividual Bob to each object on the entire map, but there is a good option available if you need more: only assign a Bob to each visible object on the map. (I kind of want to see if I can write a neat little system for this today, maybe I'll post the result here if it turns out well )
This how you would have to do it in Blitz and other languages, restore the background.

yeah it's a inconvenient but for something like Space invaders or something not much problem and fast.

for more advanced stuff yeah it's more of a inconvenience but could probably beat Amos own Bob command in terms of speed and you can have more control.

Why you would want more than 254 Bobs I don't know
Retro1234 is offline  
Old 14 August 2021, 17:47   #7
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
For an editor..a person may wish to fill an entire 49 x 49 map size with walls and only one spot where the player starts for example. 49 x 49 is greater than 254 bobs. For an editor, I do not want limitation to the amount of plotting a person needs to draw. Once testing triggers however, walls, and items are treated as paste bob and monsters are treated as bobs. In my code you can only plot six monsters of each type anyways per level...so there are total of 5 monsters each you can plot six of them per level 5 x 6 = 30 bobs maximum. So yeah, 254 is more than enough.

That being said, you are 100%. I did have multiple screens opened. When the main map starts it opens screen screen open 0 (after closing screen 1) and open screen open 2 at the sametime which appears at the bottom of the screen to select items to plot on the map. I have placed one single buffer after this line of code:

Gosub _DISPLAYTOOLBAR
Screen 0 (to select screen 0)
Double Buffer
Screen Disply 0,180,50,320,200

------------------------
_DISPLAYTOOLBAR
-----------------------
Screen Open 2,320,32,16, Lowres
Curs Off: Flash Off: Pen 0: Paper 0: Hide: Cls 0
Get Sprite Palette
Screen Display 2,,240,,

and the only doube buffer is that line code right before the main loop.

Paste Bob works great..however...Bob where I move the white square of size 16 x 16 to represent pointer as you move it leaves ghosting trail. How do I fix this?
xboxown is offline  
Old 14 August 2021, 17:51   #8
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
Sorry It's hard to understand but sound like your talking about tiles not Bobs, levels are made of 16*16 Tiles, they don't move etc.

Very basic Past Bob, Screen swap, Paste Bob same location on other buffer.
Retro1234 is offline  
Old 14 August 2021, 17:56   #9
xboxown
Registered User
 
Join Date: Dec 2012
Location: Vancouver/Canada
Posts: 675
Solved it.
xboxown is offline  
Old 14 August 2021, 22:17   #10
adrazar
Registered User
 
Join Date: Feb 2017
Location: Oslo
Posts: 90
Quote:
Originally Posted by Retro1234 View Post
This how you would have to do it in Blitz and other languages, restore the background.

yeah it's a inconvenient but for something like Space invaders or something not much problem and fast.

for more advanced stuff yeah it's more of a inconvenience but could probably beat Amos own Bob command in terms of speed and you can have more control.

Why you would want more than 254 Bobs I don't know
Right, the biggest drawback with the Amos bob system control-wise is that there's no command for redrawing only a few bobs, one has to redraw them all always. So a custom background restoration system could beat Amos' in situations where it's possible to get away with redrawing just some of the bobs on each frame.

About the system I mentioned putting together in the previous post - it didn't turn out all that neat in the end. Luckily I sense there's no need for that kind of thing here anyway
adrazar is offline  
Old 14 August 2021, 23:18   #11
Retro1234
Phone Homer
 
Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 5,773
I did do some tests once with animated Icons and it was fast, I meant to do some more tests with the Paste bob command to compare with the Bob command but never got around to it.

I suspect if you used the paste Bob command and restored the background with Paste Icon you might get some good results.

but for something like Space invaders with a black background if you just used the Paste Icon command you could get something good.
Retro1234 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy / Paste ? XimeR support.WinUAE 21 28 October 2023 04:11
Solder paste Sim085 support.Hardware 12 18 January 2019 22:56
Why did this disappear from the latest TOSEC? MethodGit project.TOSEC (amiga only) 8 23 September 2010 10:53
Bob's Bad Day - ... no Bob. AB Positive support.Games 5 16 May 2009 01:45
Icons flicker/disappear when I drag them Mattias support.WinUAE 5 08 May 2005 11:19

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:07.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12842 seconds with 15 queries