Html5 game with canvas, performance problems on firefox (4)?

I can confirm it's not working on FF 3.6.13 OS X While I was developing Snake JS I found a difference in setInterval behavior. You should really have a look at this: var timer = setInterval(fn, 500) // ... timer = setInterval(fn, 500) // Since I didn't use clearInterval() I now have two timers running in FF I see you're not using setInterval but maybe it's something similar with setTimeout?

I can confirm it's not working on FF 3.6.13 OS X. While I was developing Snake JS I found a difference in setInterval behavior. You should really have a look at this: var timer = setInterval(fn, 500) // ... timer = setInterval(fn, 500) // Since I didn't use clearInterval() I now have two timers running in FF.

I see you're not using setInterval, but maybe it's something similar with setTimeout?

To be honest, I didn't even try any browsers except chrome and ff4 yet. I saw someone playing on safari, and it worked. But ff3?

I doubt it would ever run fast enough. – Schnalle Jan 28 at 9:03 regarding multiple setTimeouts: I checked, and that's not the problem. – Schnalle Jan 28 at 9:05.

Next I tried it on firefox 4 beta 10 ... and I only get ~10 fps. But surely ff4 isn't that slow, right? I started to investigate.

Unsurprisingly, this.draw(); is by far the most expensive function, but it takes only some milliseconds (around 5, actually), on chrome ... and also on firefox. Nowhere near the >100ms it would take for meager 10fps! The whole loop() call takes not much more either, on firefox it takes less than 10ms!

The difference can be seen if you investigate dt. It should be around time-loop()-takes+5ms timeout (or whatever the browser minimum timeout value is).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions