This week, I delved further into CodeAcademy's lessons on understanding Java (which is now going to be the language I will be working with). Again, I was not able to complete as much as I would have preferred (as my new laptop has an apparent phobia of connecting to WiFi), but I feel I worked to the best of my abilities.
I finished CodeAcademy's first chapter of JavaScript lessons. In addition to reinforcing some of what I learned last week, I also learned several new concepts. The first of these is the "Modulo", represented by the "%" sign, which is difficult to explain with only text. Remember how we learned to do division with remainders in first grade (i.e. when i divide 10 by 3, I find how many times 3 fits into 10, and everything else is a remainder [10 R1])? The modulo finds the remainder of an equation involving division; if I write "10 % 3", for example, then I will find the remainder of "10/3". This seems useless in many instances, but it could be useful in video games. For example, if I implement a system into a game that crafts items out of composite materials, I can use this to keep any leftover components I have from the crafting (i.e. the remainder). I also learned about "Strings", which amount to any body of text, and "Substrings", which are parts of strings. I can specify (using "text".substring(x,y)) an amount of a string to display, which is useful for giving a hint at a body of text, like the first few words shown next to the title of an email on most websites or the first few sentences of a linked article on Facebook. I also learned about variables, which are phrases I can create that can replace larger bodies of text and commands. If I want to create a random citizen in a game, then I will have to program what the citizen will look like, how they will move, and what they will do/say if interacted with. However, if I want to create many copies of that random citizen, then I don't want to write all the code again. Instead, I can assign all that code to a keyword and make a variable under a name I create, so that the keyword "Random_Citizen" can be used in place of a huge block of code.
JavaScript is a fairly simple language, I've noticed; once one knows the vocabulary, one can basically do anything one wishes with even the most simple lexicon. Everything revolves around common sense; one can create almost anything, so far as I can tell, even without specific shortcuts.
Again, I feel that my computer's unwillingness to cooperate has hindered my progress somewhat, but, given that the computers were prohibited at school due to the PARCC, I worked as best as I could.
In the upcoming week, I plan to continue the course (at no less than one chapter of CodeAcademy per week, preferably two or more) and continue to see what I can do in regards to the game I am planning on creating. Given my current knowledge, I can probably make a very simple "Choose your own adventure"-type game, but I feel that such a game will not be enough and will ultimately end up being a waste of time. As such, more research is required into what JavaScript can do in regards to interactive media.
EDIT: It turns out that the next course chapter in CodeAcademy is "Choose Your Own Adventure"... I feel that my decision not to make one on my own was justified. It's as if it read my mind...
*Insert X-Files theme here
No comments:
Post a Comment