Today, I managed to get a lot done.
I got up until the end of the Joy of Code #10.
I was very happy to see that in the 7th video where we learn to put the lettuce in the world and make the turtle eat it, he made a very quick and easy explanation, and said " if you understood everything up to here, you might as well stop watching and move on to the next video, because all I'm going to do in the rest of this video is explain more about what we just did." I was happy because it wasn't super slow as usual.
After putting in the lettuce (or Tommy) and making the turtle eat it, I learned a concept that I believe will come in handy a lot in the future, and that is to keep the code clean and easy to read. We separated all the if statements and made it more easily readable. I also learned to add notes to each of the parts of the code, which I'm sure is extremely important if you are coding an actual application/ game, to be able to fix bugs later on.
After that video, we learned to put in snakes ( that want to eat the turtles) into the world and how to control the turtle in the world and make them avoid the snakes to not be eaten. This one concept to control with the keys made everything much more interesting. What I am planning to do next class is to flip the roles: make the turtles move randomly, and to make the snakes controllable by keyboard. The point of the game would now be you controlling the snakes trying to chase and eat the turtles.
What I am learning is that as the videos go on and on, the code which I learn to write gets more and more complicated but I am happy about that because I know and understand that with harder code comes more interesting outcomes and games that you can create.
No comments:
Post a Comment