1 decade ago by IanMac
Afternoon all,
I remember a long time ago that there was an explanation on the exception handling (or lack of it) in ImpactJS. I think that Dominic basically said that any exception throws you out of the current game loop and onto the next iteration. He also posted some code that would allow us to put in the try catch in the right place to catch any errors in the game loop.
I can't find that post anymore and I think I need the code. Can anyone help out?
The basic problem is that I have a deterministic game loop that was all working fine on all platforms and machines.
At some point though, Safari on the iPad or iPhone started giving a whole different result to every other platform - which is very annoying (and difficult to track through the javascript console.
I suspect that it is a missing audio file or something that is triggered and forces the current game loop iteration to exit. At this point any random numbers from a list that should have been used up on this iteration are used up on the next loop instead and the game takes a whole new course.
Any help much appreciated.
Ian.
I remember a long time ago that there was an explanation on the exception handling (or lack of it) in ImpactJS. I think that Dominic basically said that any exception throws you out of the current game loop and onto the next iteration. He also posted some code that would allow us to put in the try catch in the right place to catch any errors in the game loop.
I can't find that post anymore and I think I need the code. Can anyone help out?
The basic problem is that I have a deterministic game loop that was all working fine on all platforms and machines.
At some point though, Safari on the iPad or iPhone started giving a whole different result to every other platform - which is very annoying (and difficult to track through the javascript console.
I suspect that it is a missing audio file or something that is triggered and forces the current game loop iteration to exit. At this point any random numbers from a list that should have been used up on this iteration are used up on the next loop instead and the game takes a whole new course.
Any help much appreciated.
Ian.