Opened 16 months ago

Last modified 4 months ago

#14574 pending defect (pending)

GOB: Excessive blitting drags performance down

Reported by: mikrosk Owned by: sdelamarre
Priority: normal Component: Engine: Gob
Version: Keywords: gobliiins, performance
Cc: Game: Gobliiins

Description

Gob::Surface::blit() seems to be called unnaturally often even for basic screens (like the initial one in Gobliiins where only 3-4 small objects are animated), namely between two updateScreen() calls one can observe:

left 212, top 5, w 15, h 3, x 212, y 5
left 0, top 49, w 19, h 29, x 0, y 49
left 28, top 88, w 19, h 17, x 28, y 88
left 260, top 0, w 11, h 5, x 204, y 6
left 264, top 6, w 7, h 3, x 308, y 15
left 156, top 33, w 27, h 20, x 292, y 128
left 108, top 0, w 39, h 36, x 224, y 114
left 256, top 0, w 23, h 27, x 200, y 107
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 264, top 6, w 7, h 3, x 308, y 15
left 156, top 33, w 27, h 20, x 292, y 128
left 108, top 0, w 39, h 36, x 224, y 114
left 256, top 0, w 23, h 27, x 200, y 107
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 264, top 6, w 7, h 3, x 308, y 15
left 156, top 33, w 27, h 20, x 292, y 128
left 108, top 0, w 39, h 36, x 224, y 114
left 256, top 0, w 23, h 27, x 200, y 107
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 196, top 0, w 11, h 19, x 164, y 10
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 196, top 0, w 11, h 19, x 164, y 10
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 196, top 0, w 11, h 19, x 164, y 10
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 252, top 50, w 19, h 19, x 12, y 59
left 284, top 101, w 19, h 14, x 12, y 48
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 252, top 50, w 19, h 19, x 12, y 59
left 284, top 101, w 19, h 14, x 12, y 48
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 252, top 50, w 19, h 19, x 12, y 59
left 284, top 101, w 19, h 14, x 12, y 48
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 252, top 50, w 19, h 19, x 24, y 59
left 68, top 147, w 19, h 13, x 24, y 49
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 252, top 50, w 19, h 19, x 24, y 59
left 68, top 147, w 19, h 13, x 24, y 49
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 252, top 50, w 19, h 19, x 24, y 59
left 68, top 147, w 19, h 13, x 24, y 49
left 84, top 38, w 31, h 14, x 168, y 40
left 148, top 0, w 23, h 32, x 176, y 55
left 84, top 0, w 23, h 37, x 176, y 88
left 280, top 0, w 39, h 15, x 208, y 100
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 44, top 75, w 15, h 19, x 0, y 59
left 264, top 120, w 19, h 12, x 0, y 49
left 264, top 0, w 27, h 23, x 192, y 136
left 292, top 0, w 23, h 24, x 220, y 130
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 264, top 0, w 27, h 23, x 192, y 136
left 292, top 0, w 23, h 24, x 220, y 130
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 264, top 0, w 27, h 23, x 192, y 136
left 292, top 0, w 23, h 24, x 220, y 130
left 116, top 37, w 35, h 18, x 248, y 92
left 0, top 0, w 63, h 49, x 0, y 117
left 200, top 0, w 27, h 29, x 36, y 87
left 228, top 0, w 27, h 28, x 44, y 58
left 172, top 0, w 27, h 31, x 52, y 26
left 64, top 0, w 19, h 39, x 64, y 127
left 188, top 32, w 131, h 24, x 84, y 142
left 152, top 0, w 15, h 12, x 32, y 92
left 20, top 0, w 19, h 19, x 0, y 0
left 0, top 5, w 287, h 161, x 0, y 5
left 304, top 15, w 15, h 3, x 304, y 15
left 0, top 26, w 319, h 140, x 0, y 26
left 0, top 88, w 319, h 78, x 0, y 88
left 192, top 107, w 127, h 43, x 192, y 107

even after this burst it's still not done, copyRectToScreen() is called with (x, y, w, h):

0, 5, 288, 162
304, 15, 16, 4
0, 26, 320, 141
0, 88, 320, 79
192, 107, 128, 44

as we can see, with some pretty heavy and overlapping rectangles.

Combination of those two factors makes the game (and even the cursor movement) very jerky on slower platforms.

Change History (5)

comment:1 by mikrosk, 16 months ago

Type: feature requestdefect

comment:2 by sdelamarre, 15 months ago

Owner: set to sdelamarre
Resolution: pending
Status: newpending

Thanks, I'll take a look. By a coincidence my last work session was on the very same Gobliiins 1 first screen (trying to fix an unsupported Japanese version)!

comment:3 by mikrosk, 11 months ago

Any news on this by any chance? :)

comment:4 by ccawley2011, 5 months ago

I did some testing with the DS port and I noticed that gameplay is slow in the Gobliiins demo, but for some reason it’s OK during the opening, as well as during gameplay in the demos for the second and third games.

The Ween and Lost in Time demos are quite slow as well.

comment:5 by BJNFNE, 4 months ago

Adibou 2 is also slow on the 3DS. And also the Sound hangs alot.

ccawley2011 do you have also Sound problems when Gobliiins or the other Games you mentioned is slow?

Last edited 4 months ago by BJNFNE (previous) (diff)
Note: See TracTickets for help on using tickets.