SO CLOSE!!!
The first level of my game is almost completely full-proof!!! I spent another hour working on my game, adding the introduction and experimenting with arrays replacing the numerous variables found in my program. From this I learned two very interesting things...
First off, a big flaw in level one is that the user can avoid the circles simply by moving the square outside of the box and going around. Today, I modified the movement of the square in the Input.KeyDown so that the coordinates would only move if the coordinates were inside the box. The result was that the square would be stopped from exiting the box, however, if the user keeps the arrow key down, the square would force its way out of the box. Then, while I was experimenting with the arrays, I made the section of the code that controls the movement of the circles (up and down) comments and ran my program. To my complete astonishment, the square could not escape the box! The only flaw in this is that the circles weren't moving and when I uncommented the section of the code that controls the movement of the cirlces, the square can once again escape the box.
Another flaw that I haven't fixed yet is the situation involving the user hitting a circle and losing a life. I have an accumulator, which accumulates deaths and decrements the life counter, set at three, by one. Once the life counter reaches zero, then the screen is cleared and a big and fat game over sign appears on the screen. However, once the user loses a life, the level does not reset, instead, the square remains where it is, only with one less life. Therfore, one could simply rush through the level and kill two lives, yet still complete the level and have their lives reset for the next level.
Currently, I am restricting myself to working a single hour a day on my game so that I do not spend too much time on it and so that I don't get carried away with it.
Today in class, I completed Substrings Assignments 5, 6, and 7 with no problems. Tomorrow, I'll actually spend time working on the Substrings Assignment instead of modifying my game and helping other students understand the proper usage of arrays and Repetition Question 13! If I can go through tomorrow's period without any distractions, then all the Substrings Assignments will be finished, since Mr. Arkin mentioned that we do not need a documentation section in our Substrings Assignments.
That's all for today (once again!)!
No comments:
Post a Comment