melonjs / melonJS

a fresh, modern & lightweight HTML5 game engine
https://melonjs.org
MIT License
5.78k stars 641 forks source link

support for screen autoresize #4

Closed melonjs closed 11 years ago

melonjs commented 12 years ago

Implement graphics auto-resize in melonJS, and use the browser resize event, to create (full)screen size independent games.

parasyte commented 11 years ago

Well, it's not the clearTimeout that will fix the problem with performance, but the actual time passed to setTimeout. I agree it will prevent multiple defers from executing per frame. But for performance you want the delay to be longer than a single frame.

melonjs commented 11 years ago

I'm ok to spend more time on this, but do you really believe it's that critical ?

melonjs commented 11 years ago

So I did that for now (easy & cheap solution). I will give it more attention tonight once back at home, and will try this with my old mbp and several browsers (to see If there is a perfromance issue we should worry about)

parasyte commented 11 years ago

@obiot: Nope, not at all critical! Just an observation. ;)