English Amiga Board

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

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

Daedalus's Avatar
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 3,254
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 12:27.
Daedalus is offline  
Old 27 July 2017, 12:36   #62
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 3,637
Start a new thread and we'll talk.
idrougge 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
Color Saturation and Color Tint/Hue Retro-Nerd support.WinUAE 22 02 August 2018 10:38
Printing in color with WinUAE on color laser source support.Apps 7 14 April 2013 00:32
ISO true color to 256 color algorithm Lord Riton Coders. General 19 15 April 2011 17:49
New ShMUp, help required Marcuz project.Amiga Game Factory 3 28 June 2007 09:49
Cloudphobia (shmup) Dastardly Retrogaming General Discussion 0 07 November 2003 16: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 17:20.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.05631 seconds with 14 queries