#4 Potential Overblitting in Gameplay

closed-works-for-me
Jacob Greig
clipping (3)
7
2001-05-21
2001-03-27
Samuel N. Hart
No

Right now this is not so much of a bug report as a
request for persons to help me check to see if it is a
bug which exists.

The Problem:
I am not certain, but it seems that in the gameplay
(word cascade, key cascade, and free-type) we may be
overblitting on occassion. This will slow down
gameplay.

By overblitting, I mean that we may be blitting images
more than once. I.e., when we blit the background over
a moved sprite, we may be blitting that background more
than once, or when we blit a moved sprite, that may be
blitted more than once.

I have not had sufficient time to go in and verify
this myself, but I hope to soon.

If this problem exists, then it is a problem with my
implimentation of the dirty blit algorythm.

We need to check to see if it is fact doing this, and
if so, fix it.

Discussion

  • Jacob Greig
    Jacob Greig
    2001-04-06

    Logged In: YES
    user_id=141996

    If we are overblitting, we aren't counting it.

    I added printf's to DrawObject(), EraseObject() and then
    compared the number of expected blits with the blits that
    UpdateScreen() reported (in playgame.c) and I got the
    following results:

    I am erasing one sprite at 471, 9
    I am erasing one sprite at 507, 9
    I am erasing one sprite at 543, 9
    I am drawing one sprite at 471, 10
    I am drawing one sprite at 471, 10
    I am drawing one sprite at 507, 10
    I am drawing one sprite at 507, 10
    I am drawing one sprite at 543, 10
    I am drawing one sprite at 543, 10
    I am erasing one sprite at 47, 359
    I am drawing one sprite at 47, 359
    I am drawing one sprite at 1, 1
    I am drawing one sprite at 73, 1
    I am drawing one sprite at 179, 1
    I am drawing one sprite at 290, 1
    I am drawing one sprite at 364, 1
    I am drawing one sprite at 504, 1
    I am drawing one sprite at 571, 1
    I am drawing one sprite at 589, 1
    This round we had 19 updates that I recorded

    As you can see, the draw/erase blits match what
    UpdateScreen() reports.

    Attached is a diff file that shows what I did.

     
  • Jacob Greig
    Jacob Greig
    2001-04-06

    playgame.c diff file

     
    Attachments
  • Jacob Greig
    Jacob Greig
    2001-04-19

    Logged In: YES
    user_id=141996

    Attached is my patch for testing for this bug. I think it
    shows the bug is not there.

    It essentially adds on the previous patch, but it also has
    some additional code for count blits external to
    UpdateScreen().

     
  • Jacob Greig
    Jacob Greig
    2001-04-19

    Logged In: YES
    user_id=141996

    Attached is my patch for testing for this bug. I think it
    shows the bug is not there.

    It essentially adds on the previous patch, but it also has
    some additional code for count blits external to
    UpdateScreen().

     
  • Samuel N. Hart
    Samuel N. Hart
    2001-05-04

    • status: open --> closed-works-for-me
     
  • Samuel N. Hart
    Samuel N. Hart
    2001-05-04

    Logged In: YES
    user_id=87513

    I think that Jake's patch proves we aren't overblitting.
    (Or, if we are,
    it's too hard to tell ;-)

    Closing this bug.

     
  • Samuel N. Hart
    Samuel N. Hart
    2001-05-21

    • assigned_to: nobody --> bombastic