开发者

Cocoa Touch - Hypothetical Lag Comparisons

开发者 https://www.devze.com 2023-01-18 06:40 出处:网络
Hey all, I\'m developing a rhythm game for the iPhone at the moment, just wondere开发者_Python百科d if anyone had any thoughts on the best pieces to use for reaction time.

Hey all, I'm developing a rhythm game for the iPhone at the moment, just wondere开发者_Python百科d if anyone had any thoughts on the best pieces to use for reaction time.

I have all the coding worked out, and I've narrowed it down to about 2 ways:

1: Using instances of UIButton that bypass the UIControlEvent or whatever, in order to use touchesBegan and touchesEnded. I've found this to be a bit faster in the past.

2: Using UIViews with custom functions to change the state of the buttons. They would also use touches began.

The rhythm pads (eight of them) need to be able to play a sound with minimal lag, and provide some sort of feedback, i.e. changing the image of the button.

My question: Is it better to Use UIViews and make my own buttons, or actual UIButtons that have been subclassed to use touchesBegan etc?


For anyone that finds this while searching, using touchesBegan, ended, and moved is WAY faster. In terms of a rhythm game or application requiring fast input, this is the way to go.

0

精彩评论

暂无评论...
验证码 换一张
取 消