Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's easy enough to overlay text in HTML though.


That your solution to the problem is a truly hideous hack, speaks volumes.


Hideous hack? Use abs positioning, and overlay. Let's see, you have a scripting language host in the presentation layer and built-in first class methods to draw HTML elements and to canvas. The horror!


Sorry but I'm also going to consider that a pretty awful hack. If you're going through the trouble of setting up an animation loop for rendering graphics you need to have your text in the same space. If you don't now you have to bridge this gap of two different rendering worlds.

There are abstractions and techniques to overlay html elements over the canvas and sorta meld them together, sure. But they're rendered and updated in astonishingly different fashions that don't really go well together.

This is sorta like writing a game using a rendering technology like OpenGL but then sticking, say, a win32 label control on top of the rendered OpenGL screen. They both have very different patterns of control.


Then just write the text in canvas, if it's a game. The original poster said that canvas text was not accessible and didn't wrap. I don't think screen readers and tightly synced game loops go together well. And is wrapping text some big problem in the game world?


Ever played a game with a chat box?

I've played one implemented on top of Canvas and it was horrible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: