View Single Post
Old 11 April 2020, 19:06   #19
Havie
Registered User
 
Havie's Avatar
 
Join Date: Mar 2012
Location: UK
Posts: 1,893
Well...with all the discussion I have had a rethink and what was a slight upgrade is now in danger of being a full rewrite!

The original game worked like this to build up the screen:
1. Block - background
2. Blit top pipe and leave gap and blit the bottom pipe. Pipes 190 pixels high so need Clipbliting.
3. Block two black bars either side of screen to make window and hide pipes blitted to slide smoothly on to screen.
4. Blit scrolling bar at bottom of screen (wider than window so it can move smoothly and then reset.
5. Blit yellow rectangle at bottom of screen to hide bars that are off screen.
6. Print score and high score

Total of 1 block and 10 blits (of big objects) and 2 prints.

Slow but seemed to work (not terribly smooth as bars moved 3 pixels for speed)

Now:
1. Set up screen with DisplayAdjust (including yellow bar at the bottom) and print high score in bottom of screen.
2. Blit pipe (height of screen with both top and bottom) with no gap (no need for Clipblit and no need to re-blit yellow bar)
3. Use a sprite as the gap.
4. Blit scrolling bar.
5. Print score.

Use the three screen method and qbits as suggested above for maximum blitting speed.

Total of 4 blits and 3 sprites and 1 print plus faster blitting.

And breath...
Havie is offline  
 
Page generated in 0.07473 seconds with 11 queries