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

How hard would it be to make a fullscreen demo?

I want to teach myself to make games in HTML5 and most of the examples I see use fixed size frame; so I must be fair to assume going fullscreen is a hard problem.

The games I'm interested are visual novels http://en.wikipedia.org/wiki/Visual_novel or Undum-based interactive fiction http://almostgoodbye.textories.com/ upgraded with full-screen static 2D graphics and music, so graphics perfomance requirements are quite modest, but running fluidly on screens of different resolution is a must.



It's not a hard problem; you just need a little JavaScript to update your canvas's width/height attributes when the size of the DOM element changes. Then you can just use CSS to fill the window with your canvas, and use the fullscreen API to take the browser fullscreen.


Well, it's also not a simple as you describe. You might have objects within the canvas that might also need to be resized, images, text, bg images, bounding borders, etc. All these things will need to be taken into consideration when being scaled or resized.




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

Search: