Tuesday, February 8, 2011


Chapter 2. This one had a lot of code to type in. The game seems a lot more advanced as well, and I'm not familiar with it. An interesting occurrence has happened, there's is a bug. I presume, the issue is a typo I did, not a problem in the book, but instead of checking all code line by line, I am about to debug the issue.
What works: The main screen comes up. The game-screen also comes up.
What does not work: Clicking around does nothing, I believe I'm trying to play it correctly, but nothing is happening.

After a couple of hours debugging various issues, and finding two typo's I have made, finally gave up and did a diff of supplied code and what I typed in. The issue was I put a plus instead of a multiply sign. The final screen-shot shows how the game should look like. The game is now operational.

It was quite a learning experience, I'm convinced that in future, to debug GUI programs I'll need to have text representations of them, in order to make sure that logic is working, and the issue is in display. It's possible that with experience these things will become easier though.

No comments:

Post a Comment