QBasic Tutorial 48 - Bouncing Ball Animation - QB64


A image of a ball was drawn in Gimp. The ball has a dimension of 50x50. By using a loop, _LIMIT, PCOPY, and _DISPLAY, the ball can move around the screen.

_LIMIT sets how fast the loop will go.

PCOPY copies the display to reduce flickering.

This code does not work for QBasic 1.1. The code works for QB64.

Code Download
QBT48.BAS
Ball.zip (containing ball.png)



QBasic / QB64 Links

QB64 is a free download at www.qb64.com

QB64 Wiki & Manual is found at qb64.com/wiki.html

QBasic 1.1 comes with OldDOS. A zip file of OldDOS can be found at www.pcxt-micro.com/download.html

QBasic 1.1 needs DOSBox to run on Windows Vista and greater, Mac, and Linux.
DosBox is a free download at www.dosbox.com

Free QB64/QBasic Code

QBasic.Net - www.qbasic.net

Pete's QBasic Site - www.petesqbsite.com/index.php

QB45 - qb45.org

Phatcode - games.phatcode.net