Re: hit testing and retained graphics

On 6/22/2011 5:16 AM, Charles McCathieNevile wrote:
> On Wed, 22 Jun 2011 13:06:08 +0200, Paul Bakaus <pbakaus@zynga.com> 
> wrote:
>
>> Hi everyone,
>>
>> We at Zynga use hit testing to a great extend in our isometric games 
>> and have long searched for a solution that removes some of the 
>> processing burden from us. I therefore very much disagree that hit 
>> testing should be up to the js developer. If possible, this is a 
>> perfect candidate for a job the browser can help us with. And by 
>> "us", I am probably talking about almost every JS game developer.
>
> What about placing a transparent image over the top of your canvas, 
> and using an image map in it. Things that need to be clickable can be 
> updated according to whatever you're drawing, things that don't remain 
> purely immediate mode.
>
> I haven't tried it, but I've been thinking about it (and about how the 
> whole discussion reminds me of ISSUE-105 [1]) and I ran across 
> something that demonstrates the technique [2] (although I think the 
> purpose of that demo was something else, and whatever it was trying to 
> do seems horribly complex to me).
>
> [1] http://www.w3.org/html/wg/tracker/issues/105
> [2] http://zreference.com/image-map-canvas/
>
I want to point out that, apart from the difficulty of translating 
curves into polygons, image maps are not suitable for animated content.

The proposals that Richard and I have put forward put attention to use 
cases where content may be animated and/or overlapping.
Developers following WCAG 2.0 practices should have little difficulty 
incorporating these shadow dom management techniques into their projects.

-Charles

Received on Wednesday, 22 June 2011 21:55:26 UTC