ANIMATION AmigaBasic supports two types of objects that can be animated. these are bobs and sprites. They each have different characteristics and have their own advantages and disadvantages. BOBS Bobs are slower moving than sprites, but can be larger and have more colours. q 10110 QUIZ ON BOBS Type 1 for true, type 0 for false (1) Bobs can be larger than sprites (2) Bobs can be faster than sprites (3) Bobs can be drawn with the Objeditor (4) Bobs have less colours than sprites (5) Bobs cannot be animated SPRITES Sprites can be faster moving than bobs, but have a limited size and number of colours. q 01101 QUIZ ON SPRITES Type 1 for true, type 0 for false (1) Sprites canbe larger than bobs (2) Sprites can be faster than bobs (3) Sprites can be drawn with the ObjEdit (4) Sprites cannot be animated (5) Sprites have less colours than bobs OBJECT.SHAPE This command gives all the details of an object whether it is a sprite or bob. The information is a definition string which can be read from a sequential file by the INPUT$ command. This command can be used to use identical objects. q 11011 QUIZ ON OBJECT.SHAPE Type 1 for true, type 0 for false (1) An object is stored as a sequential file (2) This file can be read with an INPUT$ statement (3) OBJECT.SHAPE can only create one object (4) OBJECT.SHAPE determines the colour, size and shape (5) You can use it to create several identical objects OBJECT.START OBJECT.STOP The first command starts an objects movement The second command makes it stop moving OBJECT ON activates the object OBJECT OFF removes all objects from the screen OBJECT.CLOSE Removes an object from memory If no number is given, all objects in the current window will be erased OBJECT.PRIORITY Setting priority will determine which object will be visible when several items are overlapping or occupying the same place. The higher valued object will be displayed in front. q 11110 QUIZ ON OBJECT START/STOP ON/OFF Type 1 for true, type 0 for false (1) OBJECT ON activates an object (2) OBJECT ON without a number activates all objects (3) OBJECT START starts movement (4) OBJECT OFF removes all objects from the screen (5) OBJECT STOP removes an object from the screen OBJECT.AX OBJECT.AY Sets the aceleration for an object OBJECT.VX OBJECT.VY Sets the speed(velocity) of moving objects vx is the horizontal speed and vy is the vertical speed They can be used to tell you the present speed of an object e.g. x=OBJECT.VX(2) gives the horizontal speed of object 2 q 00010 QUIZ ON OBJECT SPEED Type 1 for true, type 0 for false (1) You cannot find the speed of an object (2) The vertical aceleration is ax (3) The vertical speed is ay (4) The horizontal speed is ax (5) The vertical speed is vy OBJECT.X OBJECT.Y Sets starting point and/or position of an object's movement shows the present location of an object OBJECT.CLIP This causes movement to occur only within a given rectangle e.g.OBJECT.CLIP (x1,y1)-(x2,y2) q 10010 QUIZ ON OBJECT LOCATION Type 1 for true, type 0 for false (1) OBJECT.X sets the starting x-co-ordinate (2) OBJECT.Y sets the starting x-co-ordinate (3) OBJECT.X and OBJECT.Y make the object visible (4) OBJECT.CLIP will mean an object will move in a rectangle (5) OBJECT.CLIP means the object will only move in one window COLLISION e.g.x=collision(2) 1=upper border,2=left border 3=lower border,4=right border This shows what border the object has hit COLLISION(0) which number object collided COLLISION(-1) tells you which window it was in COLLISION ON COLLISION OFF COLLISION STOP event trapping for collisions ON COLLISION GOSUB q 11001 QUIZ ON COLLISION Type 1 for true, type 0 for false (1) COLLISION can detect whether any border is hit (2) The maximum number of collisions is 16 (3) The value of COLLISION(0) tells which window (4) The value of COLLISION(-1) gives the object number (5) COLLISION is a form of event trapping DRAWING OBJECTS Objects can be created in different ways. One way is to use the Object Editor which is on the EXTRAS disk. This utility allows to create your own bobs and sprites.