SPRITES

BEEBUG GRAPHICS PACKAGE
FOR THE BBC MICRO MODEL B

by Stephen Allen


CONTENTS
1INTRODUCTION
2FEATURES OF THE SPRITES PACKAGE
3GETTING STARTED
4USER SPRITES
4.1Overview
4.2Memory usage
4.3Initialisation
4.4Use of variables
4.5Referencing a sprite
4.6Drawing a sprite
4.7Moving a sprite
4.8Redefining directions
4.9Deleting a sprite
4.10Delay routines
4.11Boundary definitions
5ADVANCED FEATURES
5.1Clones
5.2Animation
5.3Checking for collisions
5.4Allocating sprites
5.5Super sprites
6DEFINING SPRITES
6.1Using the definer
6.2Incorporating User Sprites
7DEMONSTRATION PROGRAMS
APPENDIX
Programs supplied on cassette


1. INTRODUCTION


   The major difference between games written in Basic (or other high level languages) and those written in assembly languages is their speed of operation. This is partly due to their graphics handling. In Basic it is simply not possible to plot intricate objects quickly; even the method of plotting user defined graphics on the screen is clumsy since each colour must be plotted separately. The usual result is that Basic games tend to have jerky graphics, or if they are smooth, the game must be kept simple. Sprites provide an easy way of generating smooth multicoloured graphics.

   This sprite package contains routines for creating and moving sprites around the screen at will, for creating sprite clones, and super sprites giving enhanced animation facilities. Special routines are included to check if a sprite collides with another, and all routines are accessible from Basic, allowing arcade style games to be written with a minimum of code. The package also contains a set of example programs.