LelandLong
Active member
Okay, we have the beginnings of animation.
But I have some questions for this group.
Right now I am drawing a new animation frame every 2 ticks (TickCount = 1/60th of a second).
I am incrementing the PacDude rect.left by an increment value of +/- 5.
If its below window.left=200 or higher than 400 I reverse course.
I obscure the cursor if the mouse is inside the game window.
I am inefficiently re-drawing everything every frame (black fill, game image (blue walls, etc), & PacMan image). On the small & medium windows this looks fine thus far, but the large window is starting to show some lag, at least on my Basilisk emulator of a Mac Quadra900 (68040 w/256M RAM). I can only imagine a slower Mac being even slower.
Okay, all well and good.
Questions for this group:
1) do you think I should be using TickCount as the framerate
2) I think my drawing of the entire window is overkill and not completely necessary. If the moving objects don't overlap any of the blue walls of the backdrop image, then I should be able to just "erase" the current object with a black fill of a small rect, then draw the new object in the new location. This should speed things up dramatically across the board. Plus we will soon have 5 moving objects and 4 flashing objects and an occasional addition object (Fruit bonus)
But I have some questions for this group.
Right now I am drawing a new animation frame every 2 ticks (TickCount = 1/60th of a second).
I am incrementing the PacDude rect.left by an increment value of +/- 5.
If its below window.left=200 or higher than 400 I reverse course.
I obscure the cursor if the mouse is inside the game window.
I am inefficiently re-drawing everything every frame (black fill, game image (blue walls, etc), & PacMan image). On the small & medium windows this looks fine thus far, but the large window is starting to show some lag, at least on my Basilisk emulator of a Mac Quadra900 (68040 w/256M RAM). I can only imagine a slower Mac being even slower.
Okay, all well and good.
Questions for this group:
1) do you think I should be using TickCount as the framerate
2) I think my drawing of the entire window is overkill and not completely necessary. If the moving objects don't overlap any of the blue walls of the backdrop image, then I should be able to just "erase" the current object with a black fill of a small rect, then draw the new object in the new location. This should speed things up dramatically across the board. Plus we will soon have 5 moving objects and 4 flashing objects and an occasional addition object (Fruit bonus)