English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 27 July 2017, 13:16   #61
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,335
That's more or less it really. I don't know if you're a reader of Amiga Future, but these are the very topics I'm covering at the moment in the Blitz tutorial series - blitting methods and double buffering are coming up in the next issue, with scrolling, dual playfields and sprites the following issue. But the basics are:

0: n = 0
1: Draw graphics required to bitmap n
2: Wait for vertical blank
3: Display bitmap n
4: n = 1 - n ; swap n between 0 and 1
5: Goto 1

In this way, you never draw to the bitmap that's actually displayed on screen. This means you can take as long as you like drawing the next frame, and when it's ready put it on display and redraw the first one. You don't need separate screens to do this - just bitmaps, and using a variable (n in my example) means you don't have to have two separate bits of code for drawing the two frames; just Use Bitmap n and then draw as you need.

Triple buffering adds another buffer to the cycle so that your program can draw ahead without waiting for the second buffer to become displayed. But this is of limited use for typical Amiga games which generally run in sync with the vertical blank. Alternatively (and I think this is what idrougge is talking about), a third bitmap can be used to provide "fill-in" data when QBlit is used - sections of the third bitmap are copied back to the currently used bitmap when shapes are erased and re-blitted. This is similar to a buffered blit but gives you a bit more control.

Last edited by Daedalus; 27 July 2017 at 13:27.
Daedalus is offline  
AdSense AdSense  
Old 27 July 2017, 13:36   #62
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,075
Start a new thread and we'll talk.
idrougge is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Saturation and Color Tint/Hue Retro-Nerd support.WinUAE 19 28 August 2017 10:06
Printing in color with WinUAE on color laser source support.Apps 7 14 April 2013 01:32
ISO true color to 256 color algorithm Lord Riton Coders. General 19 15 April 2011 18:49
New ShMUp, help required Marcuz project.Amiga Game Factory 3 28 June 2007 10:49
Cloudphobia (shmup) Dastardly Retrogaming General Discussion 0 07 November 2003 17:53

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 03:14.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.20725 seconds with 14 queries