CMM2 graphics examples and explanation
| Author | Message | ||||
TassyJim![]() Guru Joined: 07/08/2011 Location: AustraliaPosts: 6506 |
Spurred on by Peters great tutorials, I decide to do some comparisons between the various ways of drawing the cells in the "Game of Life" I modified my version of the game to repeat the same set using different drawing methods. I also did one run with all the calculations but no drawing. This was used as the base. Time to draw approximately 200 cells: 1. Use TEXT to draw a single character 8mS 2. Use BLIT to copy from a background page 10mS 3. Draw the cell using CIRCLE 13mS 4. use BLIT to WRITE pre-prepared sprites 14mS As a comparison, the rest of the routine took 217mS so the graphics is only a small part of the speed considerations. The fastest was TEXT so for graphics with a single colour, a defined font would be a good choice. Next is BLIT between areas the screen. This can be full colour images so would give the best looking display. Next is drawing directly for each cell. Simple to do for basic shapes. Last was using BLIT WRITE (saved SPRITES). This method does do transparency so might be the right choice if that's of interest. BLIT is nearly as fast as TEXT but has the advantage of full colour. Jim VK7JH MMedit |
||||