Facebook OA / AI2 – Week 10 (April 1 – April 8)
This week, I am into my third week resolving the getter / setter bug, and finally managed to solve it!
This method did not work! After numerous checks, there was no reason why it should not work and the problem was isolated to a possible way Java webview might have handled the thread calls. Apparently, there was a blocking thread somewhere after the original Java function was called, leading to the game blocking on this thread and hence hanging. Given not much form of debugging and a relatively long build time, this was frustrating and took a long time to trace. But nevertheless fun indeed!
This might be getting a little hard to see without visuals, so here is a callback diagram:
Just to test the piece works, I wrote a program to set the value of a sprite using its getter (which should effectively not hang the game and run as per normal).
Phew. It worked.
For next steps, I will be moving on to adding user interfacing and packaging the game for release to the public.