Stutter using ANIMCOLL

Previous topic - Next topic

Millerszone

Using this command batHitBall = ANIMCOLL(ball,0, ballX, ballY, bat, batAnim, batX, batY) I get about
a 1/2 second stutter of the ball when I swing the bat, but it only happens with the first pitch and
on a slow computer. After the first pitch it works fine, smooth and on my quad PC the ball never stutters.

I even tried putting ANIMCOLL(ball,0, ballX, ballY, bat, batAnim, batX, batY) in the main loop and still
the same thing.

Any help would be appreciated.

Mike
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5

Hatonastick

When you say 'slow computer', we talking Netbook here?
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Kitty Hello

Yes. When you first use SPRCOLL on an image, I read the collision pixels into an array. That takes time. If you want to pre-load that, use:
SPRCOLL(id,0,0, id,0,0)
on that sprite after you loaded it.

Millerszone

Thanks that worked.

I was testing on a older Acer 1.5Ghz laptop, but it also did the same thing on an iPad.
Hardware: iMac 27", MacBook Air, PC 3.5Ghz Quad
Developing Tools: GLBasic SDK, Gideros Studio, PureBasic
Developing for: iOS, Android, Windows, OS X, webOS, HTML5