Example 2: This example demonstrates how to insert bitmaps in the world and how to use these bitmaps to build sprite frame descriptors. It also demonstrates the pixel precise collision detection routine of BETATRON. When working with sprites you must remember that a bitmap cannot be assigned to a sprite. Only a frame descriptor can be assigned to a sprite. So , generally, bitmaps cannot be used directly which means that every time you insert some bitmaps in the world you also have to create some frame descriptors. You assign a frame descriptor to a sprite by setting values in TOsprite::framenow and/or TOsprite::framebase. Notice that the sprite representing the 2nd sign (TOsign2) is a descendant of TOsprite. It carries one new field: a pointer to the other sign. This pointer is used for the collision detection check inside sign2action() Of course, there is way to check an object for collision against an entire set of sprites by using a 'clustering grid'. This is shown in the next example. The TOworld::collision() routine works in 2 different modes. In the first mode the collision masks of the frame descriptors assigned to the sprites are used for pixel precise collision detection. If both sprites have collision masks then this mode is selected automatically. In case that at least one sprite does not have collision mask then TOworld::collision() selects the second mode which uses the bounding boxes of the sprites for the collision detection. In the last case the collision detection is somehow poor. To see TOworld::collision() working in the 'poor' mode comment out the call: myworld.makeframecolidmask(1); or pass a 0 as the third argument of the call: myworld.make1bitmapdescr(0,0,1); and then recompile the example program.