GOB: Unnecessary slowdown on slow computers
|Reported by:||SF/uweryssel||Owned by:||DrMcCoy|
During testing of my AmigaOS 3 port of version 0.10.0 I've detected
that Gobliiins is ca. 50 % slower than in the MacOS version:
In MacOS version the character needs for a certain distance 4.7 seconds,
in my port it needs 7.5 seconds.
Although the Amiga port runs only on a M68060/50MHz this slowdown
of this quite old game could not accepted. So I looked into the
source code and made same tests, and I found the slowdown "bug":
In engines/gob/game_v1.cpp function Game_v1::collisionsBlock line 914
a delta time is calculated using a cycle time (normally 80 ms) minus
a measured time (in my case 40 ms on average). This delta time is used
to process the user inputs (in my case 80-40 = 40 ms). After that
the screen is updated (copyRectToScreen and updateScreen) and needs
more 30-40 ms. This high drawing time results from the full screen redraws.
The auto computing of the changed parts cannot save time, because of
the high checksum calculation runtime.
So one cycle is 40 + 40 + ~40 ms = ~120 ms (instead of 80 ms). That's
the 50 % increase. If I switch the game to fast mode (Ctrl-F) I get the
above mentioned ~5 seconds. This is because the above measures time span of 40 ms
is doubled to 80 ms and the delta time is therefore decreased to almost zero.
To get the right cycle time the drawing time have to be measured, too.
Ticket imported from: #1767748. Ticket imported from: bugs/3369.
Change History (6)
comment:5 by , 12 years ago
|Summary:||Gobliiins is not fast as it can be on slow computers → GOB: Unnecessary slowdown on slow computers|